{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\log.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res} 2 Jul 2025, 14:15:43

{com}. do "C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\regression_loops.do"
{txt}
{com}. *****************
. * J. HOOK, 5/27/2024
. * STATA v. 18.0
. * Updated 4/18/2025
. * (1) Run jobs in LIS
. * (2) Save .txt output
. * (3) Paste into Excel using text import wizard, creating 8 files in "\excel_data" folder:
. *               REG_results.xlxs
. *               HECK_results
. *               FT_results
. *               WH_results
. *               OCC_results
. *               PUB_results
. *               EXP_results
. *               FT_OCC_results
. * (4) Import each file into Stata using code below
. *****************
. 
. *change path*
. global MyProject "C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication"
{txt}
{com}. local ProjectDir "$MyProject"
{txt}
{com}. cd "$MyProject"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication
{txt}
{com}. 
. *nested folders:
. *\excel_data
. *\data
. *\graphs
. *\tables
. 
. *put "$MyProject\data\Macro_and_Sample_Vars.dta" in "\data" folder
. *put 8 excel files in "\excel_data" folder
. 
. *********************************************************************
. *CREATE STATA FILES FROM EXCEL DATA*
. *MERGE MACRO & SAMPLE VARS ONTO RESULTS BY DNAME FOR EACH EXCEL FILE*
. *********************************************************************
. 
. /*
> Note: macro vars in "$MyProject\data\Macro_and_Sample_Vars.dta" grand mean centered, except for year
> *Grand mean macros: x - grand mean*
> local varlist mospaid_lag1 mospaid_L9 mospaid_H9 mospaid_L6 mospaid_H6 mospaid_father_lag1 ecec1000 PubSec_lag1  wpt_lag1 gnorm_lag1
> foreach var of local varlist  {c -(}
>    egen m_`var' = mean(`var')
>    gen  c_`var' = `var'-m_`var'
>    drop m_`var'
>    label variable c_`var' "Grand mean centered" 
>    {c )-}
> gen year2 = year-1999
> */
. 
. *use to import excel sheets into Stata
. local varlist REG HECK FT WH OCC PUB EXP FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.         import excel "$MyProject\excel_data/`var'_results.xlsx", sheet("Sheet1") firstrow clear
{txt}  3{com}.         save "$MyProject\data/`var'.dta", replace
{txt}  4{com}.         merge 1:1 dname using "$MyProject\data\Macro_and_Sample_Vars.dta" 
{txt}  5{com}.         drop if _merge==2
{txt}  6{com}.         drop _merge
{txt}  7{com}.         order cname Country
{txt}  8{com}.         gen Sample_FT_OCC = Sample_FT
{txt}  9{com}.         recode Sample_FT_OCC (1=0) if Sample_OCC==0
{txt} 10{com}.         *gen weight variable - inverse SE*
.         gen w_sex = 1/(dyse_sex)
{txt} 11{com}.         gen w_mother = 1/(dyse_mother)
{txt} 12{com}.         gen w_sex_HP = 1/(dyse_sex_HP)
{txt} 13{com}.         gen w_sex_LP = 1/(dyse_sex_LP)
{txt} 14{com}.         gen w_sex_HC = 1/(dyse_sex_HC)
{txt} 15{com}.         gen w_sex_LC = 1/(dyse_sex_LC)
{txt} 16{com}.         gen w_par_WH = 1/( dyse_par_WH)
{txt} 17{com}.         gen w_par_WL = 1/( dyse_par_WL)
{txt} 18{com}.         save "$MyProject\data/`var'.dta", replace
{txt} 19{com}.    {c )-}
{res}{text}(30 vars, 280 obs)
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/REG.dta{rm}
saved
{p_end}
{res}{txt}{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}             280{txt}  (_merge==3)
{col 5}{hline 41}
(0 observations deleted)
(39 changes made to {bf:Sample_FT_OCC})
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/REG.dta{rm}
saved
{p_end}
{res}{text}(24 vars, 280 obs)
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/HECK.dta{rm}
saved
{p_end}
{res}{txt}{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}             280{txt}  (_merge==3)
{col 5}{hline 41}
(0 observations deleted)
(39 changes made to {bf:Sample_FT_OCC})
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/HECK.dta{rm}
saved
{p_end}
{res}{text}(24 vars, 236 obs)
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/FT.dta{rm}
saved
{p_end}
{res}{txt}{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}              44
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}              44{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             236{txt}  (_merge==3)
{col 5}{hline 41}
(44 observations deleted)
(39 changes made to {bf:Sample_FT_OCC})
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/FT.dta{rm}
saved
{p_end}
{res}{text}(24 vars, 217 obs)
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/WH.dta{rm}
saved
{p_end}
{res}{txt}{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}              63
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}              63{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             217{txt}  (_merge==3)
{col 5}{hline 41}
(63 observations deleted)
(33 changes made to {bf:Sample_FT_OCC})
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/WH.dta{rm}
saved
{p_end}
{res}{text}(24 vars, 220 obs)
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/OCC.dta{rm}
saved
{p_end}
{res}{txt}{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}              60
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}              60{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             220{txt}  (_merge==3)
{col 5}{hline 41}
(60 observations deleted)
(0 changes made to {bf:Sample_FT_OCC})
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/OCC.dta{rm}
saved
{p_end}
{res}{text}(24 vars, 159 obs)
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/PUB.dta{rm}
saved
{p_end}
{res}{txt}{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             121
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}             121{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             159{txt}  (_merge==3)
{col 5}{hline 41}
(121 observations deleted)
(24 changes made to {bf:Sample_FT_OCC})
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/PUB.dta{rm}
saved
{p_end}
{res}{text}(24 vars, 113 obs)
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/EXP.dta{rm}
saved
{p_end}
{res}{txt}{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             167
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}             167{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             113{txt}  (_merge==3)
{col 5}{hline 41}
(167 observations deleted)
(5 changes made to {bf:Sample_FT_OCC})
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/EXP.dta{rm}
saved
{p_end}
{res}{text}(24 vars, 197 obs)
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/FT_OCC.dta{rm}
saved
{p_end}
{res}{txt}{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}              83
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}              83{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             197{txt}  (_merge==3)
{col 5}{hline 41}
(83 observations deleted)
(0 changes made to {bf:Sample_FT_OCC})
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/FT_OCC.dta{rm}
saved
{p_end}

{com}. 
.    
. *Compare gender and motherhood gaps before and after Heckman*
. use "$MyProject\data\REG.dta", clear
{txt}
{com}. keep dname dydx_sex dydx_mother
{txt}
{com}. rename dydx_sex REG_sex
{res}{txt}
{com}. rename dydx_mother REG_mother
{res}{txt}
{com}. save "$MyProject\data\REG_for_merge.dta", replace 
{txt}{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data\REG_for_merge.dta{rm}
saved
{p_end}

{com}. use "$MyProject\data\HECK.dta", clear
{txt}
{com}. merge 1:1 dname using  "$MyProject\data\REG_for_merge.dta"
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}             280{txt}  (_merge==3)
{col 5}{hline 41}

{com}. drop _merge
{txt}
{com}. gen diff_sex = REG_sex - dydx_sex
{txt}
{com}. sum diff_sex

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}diff_sex {c |}{res}        280   -1.797407     .942291    -4.9731      1.711
{txt}
{com}. hist diff_sex
{txt}(bin={res}16{txt}, start={res}-4.9731002{txt}, width={res}.41775626{txt})
{res}{txt}
{com}. gen diff_mom = REG_mother - dydx_mother
{txt}
{com}. sum diff_mom

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}diff_mom {c |}{res}        280   -3.622153    1.953821   -11.5118     1.1611
{txt}
{com}. hist diff_mom   
{txt}(bin={res}16{txt}, start={res}-11.5118{txt}, width={res}.79205624{txt})
{res}{txt}
{com}. 
. /*
> . sum diff_sex
> 
>     Variable |        Obs        Mean    Std. Dev.       Min        Max
> -------------+---------------------------------------------------------
>     diff_sex |        280   -1.797407     .942291    -4.9731      1.711
> 
> . sum diff_mom
> 
>     Variable |        Obs        Mean    Std. Dev.       Min        Max
> -------------+---------------------------------------------------------
>     diff_mom |        280   -3.622153    1.953821   -11.5118     1.1611
> 
> */
. 
. **********************************************
. *Figure 1: Trends in Gender Earnings Gap and Motherhood Penalty by Country, Heckman adjusted
. **********************************************
. 
. use "$MyProject\data\HECK.dta", clear
{txt}
{com}. cd "$MyProject\graphs"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\graphs
{txt}
{com}. 
. *create 95 CI from SE*
. gen hi_sex = dydx_sex + 1.96*dyse_sex
{txt}
{com}. gen lo_sex = dydx_sex - 1.96*dyse_sex
{txt}
{com}. gen hi_mom = dydx_mother + 1.96*dyse_mother
{txt}
{com}. gen lo_mom = dydx_mother - 1.96*dyse_mother
{txt}
{com}. 
. set scheme lean1
{txt}
{com}. sort Country year
{txt}
{com}. *scatter is used to add the starting and ending value labels*
. twoway  (rarea lo_sex hi_sex year, lcolor(black%10))  ///
>  (rarea lo_mom hi_mom year, lcolor(orange_red%10)) ///
>  (line dydx_sex year, legend(row(1)) by(Country, note("")) clpattern(solid) clcolor(black)) ///
>  (line dydx_mother year, legend(row(1)) by(Country,  note("")) clpattern(dash) clcolor(orange_red)) ///
>   , ytitle("") legend(row(1)) xtitle("") xlabel (1999 2019) xsize(7) ysize(9) yline(0, lcolor(black%50)) ///
>   legend(label(1 "") label(2 "")label(3 "Gender Gap") label(4 "Motherhood Penalty"))
{res}{txt}
{com}.   
. graph save "Graph" "$MyProject\graphs\Fig1.gph", replace
{txt}{p 0 4 2}
(file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\graphs\Fig1.gph{rm}
not found)
{p_end}
{res}{txt}file {bf:C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\graphs\Fig1.gph} saved

{com}. 
. 
. *************************************************
. *NOTE Table 1 made via LIS remote job submission*
. *************************************************
. 
. use "$MyProject\data\HECK.dta", clear
{txt}
{com}. 
. ************************************
. *Table 2: Survey-level Descriptives*
. ************************************
. *one way*
. sum dydx_sex dydx_mother

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        280   -17.27964    4.165154   -27.6814    -6.9754
{txt}{space 1}dydx_mother {c |}{res}        280   -7.346905    5.377826   -20.6155     6.0962
{txt}
{com}. *three-way*
. sum dydx_sex_HP dydx_sex_LP dydx_sex_HC dydx_sex_LC dydx_par_WH dydx_par_WL dydx_par_MH dydx_par_ML      

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}dydx_sex_HP {c |}{res}        280   -19.32204    5.940062    -35.979    -4.8254
{txt}{space 1}dydx_sex_LP {c |}{res}        280   -22.59274    5.893091   -36.3795    -6.2056
{txt}{space 1}dydx_sex_HC {c |}{res}        280   -8.779486    4.060153   -18.1327      4.802
{txt}{space 1}dydx_sex_LC {c |}{res}        280    -11.6189    3.754571   -21.8886      .0274
{txt}{space 1}dydx_par_WH {c |}{res}        280   -5.656678    5.896088   -21.4021    11.8644
{txt}{hline 13}{c +}{hline 57}
{space 1}dydx_par_WL {c |}{res}        280   -8.117634    5.748292   -22.1223     4.8593
{txt}{space 1}dydx_par_MH {c |}{res}        280    4.885879    3.613084    -6.4562    15.4701
{txt}{space 1}dydx_par_ML {c |}{res}        280    2.856203    2.939889    -5.8407    10.5561
{txt}
{com}. *macro*
. sum ecec1000 mospaid_lag1 mospaid_L6 mospaid_H6 gnorm_lag1 wpt_lag1 PubSec_lag1 year

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}ecec1000 {c |}{res}        280    4.281656    2.398514   .0608445   11.68756
{txt}mospaid_lag1 {c |}{res}        280    12.49341    11.33779          0   49.38499
{txt}{space 2}mospaid_L6 {c |}{res}        280    5.022534    1.796391          0          6
{txt}{space 2}mospaid_H6 {c |}{res}        280    7.470881    10.51956          0   43.38499
{txt}{space 2}gnorm_lag1 {c |}{res}        280    2.628532    .3171191   1.969744   3.391452
{txt}{hline 13}{c +}{hline 57}
{space 4}wpt_lag1 {c |}{res}        280    31.97429    15.85127        3.8       75.4
{txt}{space 1}PubSec_lag1 {c |}{res}        280    17.34465    5.724347   2.380984      30.26
{txt}{space 8}year {c |}{res}        280    2009.568    5.477458       1999       2019
{txt}
{com}. 
. **********************
. *Appendix Figure 1: histograms*
. **********************
. set scheme lean1
{txt}
{com}. cd "$MyProject\graphs"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\graphs
{txt}
{com}. hist dydx_sex, saving(sex) xline(0) xtitle(Gender Earnings Gap) 
{txt}(bin={res}16{txt}, start={res}-27.6814{txt}, width={res}1.294125{txt})
{res}{txt}file {bf:sex.gph} saved

{com}. hist dydx_mother, saving(mother) xline(0) xtitle(Motherhood Penalty) 
{txt}(bin={res}16{txt}, start={res}-20.6155{txt}, width={res}1.6694813{txt})
{res}{txt}file {bf:mother.gph} saved

{com}. graph combine mother.gph sex.gph, xcommon ycommon rows(1) saving(Figure2)
{res}{txt}file {bf:Figure2.gph} saved

{com}. 
. 
. ******************
. *Appendix Table 1 made via LIS remote job submission except for macro vars below*
. ******************
. tabstat ecec1000, by(Country) s(min, max)

{txt}Summary for variables: ecec1000
Group variable: Country (Country)

{ralign 14:Country} {...}
{c |}       Min       Max
{hline 15}{c +}{hline 20}
{ralign 14:Australia} {...}
{c |}{...}
 {res} 2.535071  4.854465
{txt}{ralign 14:Austria} {...}
{c |}{...}
 {res} 1.580675  4.947987
{txt}{ralign 14:Belgium} {...}
{c |}{...}
 {res} 3.024746  6.028743
{txt}{ralign 14:Czech Republic} {...}
{c |}{...}
 {res} 1.416999  2.488925
{txt}{ralign 14:Denmark} {...}
{c |}{...}
 {res} 8.709175  11.28153
{txt}{ralign 14:Estonia} {...}
{c |}{...}
 {res}   .65064  2.990468
{txt}{ralign 14:Finland} {...}
{c |}{...}
 {res} 4.511198  6.565355
{txt}{ralign 14:France} {...}
{c |}{...}
 {res} 6.220227  8.726232
{txt}{ralign 14:Germany} {...}
{c |}{...}
 {res} 2.465466  6.539446
{txt}{ralign 14:Greece} {...}
{c |}{...}
 {res} .0608445  1.705369
{txt}{ralign 14:Hungary} {...}
{c |}{...}
 {res} 1.552197  3.017225
{txt}{ralign 14:Iceland} {...}
{c |}{...}
 {res} 5.310845   8.95911
{txt}{ralign 14:Ireland} {...}
{c |}{...}
 {res} 1.430674  3.891488
{txt}{ralign 14:Italy} {...}
{c |}{...}
 {res}  3.37544   4.18028
{txt}{ralign 14:Lithuania} {...}
{c |}{...}
 {res} 2.600744  3.459054
{txt}{ralign 14:Luxembourg} {...}
{c |}{...}
 {res} 5.341395  10.90822
{txt}{ralign 14:Netherlands} {...}
{c |}{...}
 {res} 1.886133  6.428766
{txt}{ralign 14:Norway} {...}
{c |}{...}
 {res} 5.252952  11.68756
{txt}{ralign 14:Poland} {...}
{c |}{...}
 {res} .5975429  2.402224
{txt}{ralign 14:Slovakia} {...}
{c |}{...}
 {res} 1.381508   2.70305
{txt}{ralign 14:Slovenia} {...}
{c |}{...}
 {res} 2.587535  3.044365
{txt}{ralign 14:Spain} {...}
{c |}{...}
 {res} 1.970984  3.198053
{txt}{ralign 14:Sweden} {...}
{c |}{...}
 {res} 5.387733  9.875647
{txt}{ralign 14:Switzerland} {...}
{c |}{...}
 {res} 3.791046  7.166635
{txt}{ralign 14:United Kingdom} {...}
{c |}{...}
 {res} 2.865227  6.008095
{txt}{ralign 14:United States} {...}
{c |}{...}
 {res} 2.039361  2.693943
{txt}{hline 15}{c +}{hline 20}
{ralign 14:Total} {...}
{c |}{...}
 {res} .0608445  11.68756
{txt}{hline 15}{c BT}{hline 20}

{com}. tabstat mospaid_lag1, by(Country) s(min, max)

{txt}Summary for variables: mospaid_lag1
Group variable: Country (Country)

{ralign 14:Country} {...}
{c |}       Min       Max
{hline 15}{c +}{hline 20}
{ralign 14:Australia} {...}
{c |}{...}
 {res}        0  4.153878
{txt}{ralign 14:Austria} {...}
{c |}{...}
 {res} 13.84626   31.8464
{txt}{ralign 14:Belgium} {...}
{c |}{...}
 {res} 6.461588  7.461519
{txt}{ralign 14:Czech Republic} {...}
{c |}{...}
 {res} 25.38481  49.38499
{txt}{ralign 14:Denmark} {...}
{c |}{...}
 {res} 11.53855  12.46163
{txt}{ralign 14:Estonia} {...}
{c |}{...}
 {res} 38.30799  38.30799
{txt}{ralign 14:Finland} {...}
{c |}{...}
 {res} 36.69259  37.16182
{txt}{ralign 14:France} {...}
{c |}{...}
 {res} 3.692336  9.692382
{txt}{ralign 14:Germany} {...}
{c |}{...}
 {res} 13.38472  25.23096
{txt}{ralign 14:Greece} {...}
{c |}{...}
 {res} 3.692336  9.923153
{txt}{ralign 14:Hungary} {...}
{c |}{...}
 {res} 36.92336  36.92336
{txt}{ralign 14:Iceland} {...}
{c |}{...}
 {res} 6.000046  6.000046
{txt}{ralign 14:Ireland} {...}
{c |}{...}
 {res} 3.230794  6.000046
{txt}{ralign 14:Italy} {...}
{c |}{...}
 {res} 11.00008  11.00778
{txt}{ralign 14:Lithuania} {...}
{c |}{...}
 {res}  14.3078   14.3078
{txt}{ralign 14:Luxembourg} {...}
{c |}{...}
 {res} 9.692382  9.692382
{txt}{ralign 14:Netherlands} {...}
{c |}{...}
 {res} 3.692336  9.692382
{txt}{ralign 14:Norway} {...}
{c |}{...}
 {res} 21.00016  32.76948
{txt}{ralign 14:Poland} {...}
{c |}{...}
 {res} 3.692336  12.00009
{txt}{ralign 14:Slovakia} {...}
{c |}{...}
 {res} 37.84644  39.23107
{txt}{ralign 14:Slovenia} {...}
{c |}{...}
 {res} 12.03306  12.03306
{txt}{ralign 14:Spain} {...}
{c |}{...}
 {res} 3.692336  3.692336
{txt}{ralign 14:Sweden} {...}
{c |}{...}
 {res} 12.85724  13.84626
{txt}{ralign 14:Switzerland} {...}
{c |}{...}
 {res} 1.846168  3.230794
{txt}{ralign 14:United Kingdom} {...}
{c |}{...}
 {res} 4.153878   9.00007
{txt}{ralign 14:United States} {...}
{c |}{...}
 {res}        0         0
{txt}{hline 15}{c +}{hline 20}
{ralign 14:Total} {...}
{c |}{...}
 {res}        0  49.38499
{txt}{hline 15}{c BT}{hline 20}

{com}. tabstat gnorm_lag1 , by(Country) s(min, max)

{txt}Summary for variables: gnorm_lag1
Group variable: Country (Country)

{ralign 14:Country} {...}
{c |}       Min       Max
{hline 15}{c +}{hline 20}
{ralign 14:Australia} {...}
{c |}{...}
 {res} 2.948446  2.984397
{txt}{ralign 14:Austria} {...}
{c |}{...}
 {res} 1.969744      2.54
{txt}{ralign 14:Belgium} {...}
{c |}{...}
 {res} 2.510493  3.011846
{txt}{ralign 14:Czech Republic} {...}
{c |}{...}
 {res} 2.495229  2.698711
{txt}{ralign 14:Denmark} {...}
{c |}{...}
 {res} 3.077731  3.385856
{txt}{ralign 14:Estonia} {...}
{c |}{...}
 {res} 2.270998  2.936087
{txt}{ralign 14:Finland} {...}
{c |}{...}
 {res} 2.602071  3.082222
{txt}{ralign 14:France} {...}
{c |}{...}
 {res} 2.367841  2.970643
{txt}{ralign 14:Germany} {...}
{c |}{...}
 {res} 2.119563  2.814569
{txt}{ralign 14:Greece} {...}
{c |}{...}
 {res} 2.046197  2.065802
{txt}{ralign 14:Hungary} {...}
{c |}{...}
 {res} 2.163371  2.475145
{txt}{ralign 14:Iceland} {...}
{c |}{...}
 {res} 2.881404  3.043647
{txt}{ralign 14:Ireland} {...}
{c |}{...}
 {res} 2.563583  2.908234
{txt}{ralign 14:Italy} {...}
{c |}{...}
 {res}        2  2.339669
{txt}{ralign 14:Lithuania} {...}
{c |}{...}
 {res} 2.215299  2.432641
{txt}{ralign 14:Luxembourg} {...}
{c |}{...}
 {res} 2.137104  2.472296
{txt}{ralign 14:Netherlands} {...}
{c |}{...}
 {res} 2.545017  3.071709
{txt}{ralign 14:Norway} {...}
{c |}{...}
 {res} 3.022897  3.372615
{txt}{ralign 14:Poland} {...}
{c |}{...}
 {res} 2.140301  2.472972
{txt}{ralign 14:Slovakia} {...}
{c |}{...}
 {res} 2.453528  2.784091
{txt}{ralign 14:Slovenia} {...}
{c |}{...}
 {res} 2.470705  2.863066
{txt}{ralign 14:Spain} {...}
{c |}{...}
 {res} 2.551821  2.952504
{txt}{ralign 14:Sweden} {...}
{c |}{...}
 {res} 2.831772  3.391452
{txt}{ralign 14:Switzerland} {...}
{c |}{...}
 {res} 2.147911  2.783655
{txt}{ralign 14:United Kingdom} {...}
{c |}{...}
 {res}  2.52176  2.884161
{txt}{ralign 14:United States} {...}
{c |}{...}
 {res} 2.512963  2.845653
{txt}{hline 15}{c +}{hline 20}
{ralign 14:Total} {...}
{c |}{...}
 {res} 1.969744  3.391452
{txt}{hline 15}{c BT}{hline 20}

{com}. tabstat wpt_lag1 , by(Country) s(min, max)

{txt}Summary for variables: wpt_lag1
Group variable: Country (Country)

{ralign 14:Country} {...}
{c |}       Min       Max
{hline 15}{c +}{hline 20}
{ralign 14:Australia} {...}
{c |}{...}
 {res}     44.5      46.8
{txt}{ralign 14:Austria} {...}
{c |}{...}
 {res}     32.4      47.7
{txt}{ralign 14:Belgium} {...}
{c |}{...}
 {res}     37.4      43.6
{txt}{ralign 14:Czech Republic} {...}
{c |}{...}
 {res}      8.5      10.4
{txt}{ralign 14:Denmark} {...}
{c |}{...}
 {res}     32.7      37.5
{txt}{ralign 14:Estonia} {...}
{c |}{...}
 {res}     11.5      15.3
{txt}{ralign 14:Finland} {...}
{c |}{...}
 {res}     16.8      20.1
{txt}{ralign 14:France} {...}
{c |}{...}
 {res}     29.5      31.7
{txt}{ralign 14:Germany} {...}
{c |}{...}
 {res}     36.4      47.4
{txt}{ralign 14:Greece} {...}
{c |}{...}
 {res}      7.7      13.2
{txt}{ralign 14:Hungary} {...}
{c |}{...}
 {res}      5.5       9.1
{txt}{ralign 14:Iceland} {...}
{c |}{...}
 {res}       37      37.5
{txt}{ralign 14:Ireland} {...}
{c |}{...}
 {res}     30.6      35.7
{txt}{ralign 14:Italy} {...}
{c |}{...}
 {res}     15.6      32.5
{txt}{ralign 14:Lithuania} {...}
{c |}{...}
 {res}      8.7      11.3
{txt}{ralign 14:Luxembourg} {...}
{c |}{...}
 {res}     24.6      36.3
{txt}{ralign 14:Netherlands} {...}
{c |}{...}
 {res}     67.2      75.4
{txt}{ralign 14:Norway} {...}
{c |}{...}
 {res}     37.4      44.7
{txt}{ralign 14:Poland} {...}
{c |}{...}
 {res}     10.2      14.2
{txt}{ralign 14:Slovakia} {...}
{c |}{...}
 {res}      3.8       8.5
{txt}{ralign 14:Slovenia} {...}
{c |}{...}
 {res}      7.5      13.3
{txt}{ralign 14:Spain} {...}
{c |}{...}
 {res}     16.8      25.2
{txt}{ralign 14:Sweden} {...}
{c |}{...}
 {res}     29.8      36.4
{txt}{ralign 14:Switzerland} {...}
{c |}{...}
 {res}     56.5      59.4
{txt}{ralign 14:United Kingdom} {...}
{c |}{...}
 {res}     41.3      44.8
{txt}{ralign 14:United States} {...}
{c |}{...}
 {res}     23.9      26.6
{txt}{hline 15}{c +}{hline 20}
{ralign 14:Total} {...}
{c |}{...}
 {res}      3.8      75.4
{txt}{hline 15}{c BT}{hline 20}

{com}. tabstat PubSec_lag1 , by(Country) s(min, max)

{txt}Summary for variables: PubSec_lag1
Group variable: Country (Country)

{ralign 14:Country} {...}
{c |}       Min       Max
{hline 15}{c +}{hline 20}
{ralign 14:Australia} {...}
{c |}{...}
 {res} 13.29047   13.7069
{txt}{ralign 14:Austria} {...}
{c |}{...}
 {res} 10.17311     17.15
{txt}{ralign 14:Belgium} {...}
{c |}{...}
 {res}  16.9456     18.79
{txt}{ralign 14:Czech Republic} {...}
{c |}{...}
 {res}    12.86    16.395
{txt}{ralign 14:Denmark} {...}
{c |}{...}
 {res}    23.93     29.43
{txt}{ralign 14:Estonia} {...}
{c |}{...}
 {res}    14.87     23.66
{txt}{ralign 14:Finland} {...}
{c |}{...}
 {res} 21.10682     24.99
{txt}{ralign 14:France} {...}
{c |}{...}
 {res} 21.70924     22.59
{txt}{ralign 14:Germany} {...}
{c |}{...}
 {res} 10.42259  11.65278
{txt}{ralign 14:Greece} {...}
{c |}{...}
 {res} 2.380984     17.67
{txt}{ralign 14:Hungary} {...}
{c |}{...}
 {res} 18.98812  20.41304
{txt}{ralign 14:Iceland} {...}
{c |}{...}
 {res} 24.98015  24.99788
{txt}{ralign 14:Ireland} {...}
{c |}{...}
 {res}    14.61     15.84
{txt}{ralign 14:Italy} {...}
{c |}{...}
 {res}  13.6875      14.5
{txt}{ralign 14:Lithuania} {...}
{c |}{...}
 {res}    22.16     24.75
{txt}{ralign 14:Luxembourg} {...}
{c |}{...}
 {res}    10.08     11.68
{txt}{ralign 14:Netherlands} {...}
{c |}{...}
 {res}    11.95     13.07
{txt}{ralign 14:Norway} {...}
{c |}{...}
 {res} 28.20402   30.0675
{txt}{ralign 14:Poland} {...}
{c |}{...}
 {res} 10.70549  16.54296
{txt}{ralign 14:Slovakia} {...}
{c |}{...}
 {res} 9.363969     18.89
{txt}{ralign 14:Slovenia} {...}
{c |}{...}
 {res}    13.12     16.18
{txt}{ralign 14:Spain} {...}
{c |}{...}
 {res} 12.06749   15.1725
{txt}{ralign 14:Sweden} {...}
{c |}{...}
 {res} 28.34148     30.26
{txt}{ralign 14:Switzerland} {...}
{c |}{...}
 {res} 7.117464     10.12
{txt}{ralign 14:United Kingdom} {...}
{c |}{...}
 {res}    16.01     19.64
{txt}{ralign 14:United States} {...}
{c |}{...}
 {res} 7.735826     16.71
{txt}{hline 15}{c +}{hline 20}
{ralign 14:Total} {...}
{c |}{...}
 {res} 2.380984     30.26
{txt}{hline 15}{c BT}{hline 20}

{com}. 
. ***************************************
. *Online Appendix Table: Method Comparison
. *TEST 4 methods on HECKMAN Full Sample*
. *(1) cluster, (2) cluster hc2, dfadjust, (3) weight by inverse SE, (4) cluser wildbootstrap
. ***************************************
. cd "$MyProject\tables"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\tables
{txt}
{com}. 
. estimates clear
{res}{txt}
{com}. qui reg dydx_sex c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, cluster(cname)
{txt}
{com}.         eststo m_clus
{txt}
{com}. qui reg dydx_sex c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}.         eststo m_hc2
{txt}
{com}. qui reg dydx_sex c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2 [aw=w_sex], cluster(cname)
{txt}
{com}.         eststo m_aw
{txt}
{com}. wildbootstrap regress dydx_sex c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, cluster(cname) rseed(12345)
{res}
{txt}{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_ecec1000 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_ecec1000}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text} done{text} ({result:27})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text} done{text} ({result:20})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_mospaid_L6 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_mospaid_L6}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text} done{text} ({result:23})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text} done{text} ({result:27})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_mospaid_H6 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_mospaid_H6}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text} done{text} ({result:23})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text} done{text} ({result:27})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_gnorm_lag1 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_gnorm_lag1}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text} done{text} ({result:23})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text} done{text} ({result:21})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_wpt_lag1 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_wpt_lag1}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text} done{text} ({result:20})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text} done{text} ({result:21})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_PubSec_lag1 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_PubSec_lag1}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text} done{text} ({result:23})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text}.{text}.{text}.{text} done{text} ({result:26})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:year2 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:year2}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}30{text}.{text}.{text}.{text}.{text} done{text} ({result:34})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text}.{text}.{text}.{text} done{text} ({result:26})
{res}
{txt}Wild cluster bootstrap{col 53}{txt}Number of obs{col 71} = {res} 280
{txt}Linear regression{col 53}{txt}Number of clusters{col 71} = {res}  26
{col 53}{txt}Cluster size:
{txt}Cluster variable: {res:cname}{col 68}{txt}min{col 71} = {res}   3
{txt}Error weight: Rademacher{col 68}{txt}avg{col 71} = {res}10.8
{col 68}{txt}max{col 71} = {res}  21
{col 1}{text}{hline 25}{c TT}{hline 11}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}                dydx_sex{col 26}{c |}   Estimate{col 38}      t{col 46} p-value{col 54}    [95% conf. interval]
{res}{col 1}{text}{hline 25}{c +}{hline 11}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}constraints             {col 26}{c |}
{res}{col 1}{text}          c_ecec1000 = 0{col 26}{c |}{result}{space 2} .3592881{col 38}{space 1}   1.66{col 46}{space 3}0.220{col 54}{space 3}-.2426877{col 66}{space 3} .9096238
{col 1}{text}        c_mospaid_L6 = 0{col 26}{c |}{result}{space 2}-.1828836{col 38}{space 1}  -0.68{col 46}{space 3}0.622{col 54}{space 3}-1.143715{col 66}{space 3} 1.071393
{col 1}{text}        c_mospaid_H6 = 0{col 26}{c |}{result}{space 2}-.1643969{col 38}{space 1}  -2.89{col 46}{space 3}0.046{col 54}{space 3}-.2934731{col 66}{space 3}-.0061206
{col 1}{text}        c_gnorm_lag1 = 0{col 26}{c |}{result}{space 2} .3818206{col 38}{space 1}   0.19{col 46}{space 3}0.866{col 54}{space 3}-4.878344{col 66}{space 3} 5.251557
{col 1}{text}          c_wpt_lag1 = 0{col 26}{c |}{result}{space 2}-.2168211{col 38}{space 1}  -6.93{col 46}{space 3}0.000{col 54}{space 3}-.3237091{col 66}{space 3}-.1441961
{col 1}{text}       c_PubSec_lag1 = 0{col 26}{c |}{result}{space 2}-.1644747{col 38}{space 1}  -2.10{col 46}{space 3}0.056{col 54}{space 3}-.3469064{col 66}{space 3} .0073955
{col 1}{text}               year2 = 0{col 26}{c |}{result}{space 2} .2006461{col 38}{space 1}   2.93{col 46}{space 3}0.028{col 54}{space 3} .0538523{col 66}{space 3} .3300112
{col 1}{text}{hline 25}{c BT}{hline 11}{hline 8}{hline 8}{hline 12}{hline 12}
{res}{txt}
{com}. eststo m_boot
{txt}
{com}.         
. esttab m* using Table_OS2_Method.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain replace
{res}{txt}{p 0 4 2}
(file {bf}
Table_OS2_Method.csv{rm}
not found)
{p_end}
(output written to {browse  `"Table_OS2_Method.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. qui reg dydx_mother c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, cluster(cname)
{txt}
{com}.         eststo m_clus
{txt}
{com}. qui reg dydx_mother c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}.         eststo m_hc2
{txt}
{com}. qui reg dydx_mother c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2 [aw=w_mother], cluster(cname)
{txt}
{com}.         eststo m_aw
{txt}
{com}. wildbootstrap regress dydx_mother c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, cluster(cname) rseed(12345)
{res}
{txt}{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_ecec1000 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_ecec1000}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text} done{text} ({result:28})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text} done{text} ({result:23})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_mospaid_L6 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_mospaid_L6}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text} done{text} ({result:22})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text} done{text} ({result:20})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_mospaid_H6 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_mospaid_H6}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text}.{text} done{text} ({result:24})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text}.{text} done{text} ({result:24})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_gnorm_lag1 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_gnorm_lag1}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text} done{text} ({result:22})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text} done{text} ({result:22})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_wpt_lag1 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_wpt_lag1}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text} done{text} ({result:28})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text} done{text} ({result:21})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:c_PubSec_lag1 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:c_PubSec_lag1}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text} done{text} ({result:22})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text}.{text}.{text}.{text} done{text} ({result:26})

{p}Performing {res}    1,000{txt} replications for p-value for {bf:year2 = 0} {txt}...{p_end}
{res}{txt}Computing confidence interval for {bf:year2}
{text}  Lower bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text}.{text} done{text} ({result:23})
{text}  Upper bound{text}: {text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}10{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}.{text}20{text}.{text}.{text} done{text} ({result:22})
{res}
{txt}Wild cluster bootstrap{col 53}{txt}Number of obs{col 71} = {res} 280
{txt}Linear regression{col 53}{txt}Number of clusters{col 71} = {res}  26
{col 53}{txt}Cluster size:
{txt}Cluster variable: {res:cname}{col 68}{txt}min{col 71} = {res}   3
{txt}Error weight: Rademacher{col 68}{txt}avg{col 71} = {res}10.8
{col 68}{txt}max{col 71} = {res}  21
{col 1}{text}{hline 25}{c TT}{hline 11}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}             dydx_mother{col 26}{c |}   Estimate{col 38}      t{col 46} p-value{col 54}    [95% conf. interval]
{res}{col 1}{text}{hline 25}{c +}{hline 11}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}constraints             {col 26}{c |}
{res}{col 1}{text}          c_ecec1000 = 0{col 26}{c |}{result}{space 2} .3585351{col 38}{space 1}   0.63{col 46}{space 3}0.646{col 54}{space 3}-1.076547{col 66}{space 3} 1.763758
{col 1}{text}        c_mospaid_L6 = 0{col 26}{c |}{result}{space 2}-.5683216{col 38}{space 1}  -1.29{col 46}{space 3}0.344{col 54}{space 3}-2.258072{col 66}{space 3} 1.513076
{col 1}{text}        c_mospaid_H6 = 0{col 26}{c |}{result}{space 2}-.0594247{col 38}{space 1}  -0.82{col 46}{space 3}0.516{col 54}{space 3}-.2570047{col 66}{space 3} .1175992
{col 1}{text}        c_gnorm_lag1 = 0{col 26}{c |}{result}{space 2} 1.804963{col 38}{space 1}   0.56{col 46}{space 3}0.640{col 54}{space 3}-5.772237{col 66}{space 3} 11.30653
{col 1}{text}          c_wpt_lag1 = 0{col 26}{c |}{result}{space 2} -.256721{col 38}{space 1}  -4.43{col 46}{space 3}0.000{col 54}{space 3}-.4390785{col 66}{space 3}-.1279737
{col 1}{text}       c_PubSec_lag1 = 0{col 26}{c |}{result}{space 2} .0110228{col 38}{space 1}   0.07{col 46}{space 3}0.946{col 54}{space 3}-.3557824{col 66}{space 3} .5635889
{col 1}{text}               year2 = 0{col 26}{c |}{result}{space 2} .0448355{col 38}{space 1}   0.58{col 46}{space 3}0.580{col 54}{space 3} -.127519{col 66}{space 3} .2179866
{col 1}{text}{hline 25}{c BT}{hline 11}{hline 8}{hline 8}{hline 12}{hline 12}
{res}{txt}
{com}. eststo m_boot
{txt}
{com}.         
. esttab m* using Table_OS2_Method.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_OS2_Method.csv"'})

{com}. 
. 
. *****************************************
. *Table 3
. *proceed with hc2 cluster, dfadjust
. *loop by sample for sex gap and motherhood penalty
. *****************************************
. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_3.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain replace
{res}{txt}{p 0 4 2}
(file {bf}
Table_3.csv{rm}
not found)
{p_end}
(output written to {browse  `"Table_3.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_mother c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_3.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_3.csv"'})

{com}. 
. *caculate ICC to report in text*
. estimates clear
{res}{txt}
{com}. local varlist dydx_sex dydx_mother 
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.     mixed `var'|| cname:
{txt}  3{com}.         estat icc
{txt}  4{com}.    {c )-}
{res}
{txt}Performing EM optimization ...
{res}
{txt}Performing gradient-based optimization: 
{res}{txt}Iteration 0:{space 2}Log likelihood = {res:-683.60971}  
Iteration 1:{space 2}Log likelihood = {res:-683.60971}  
{res}
{txt}Computing standard errors ...
{res}
{txt}Mixed-effects ML regression{col 56}Number of obs{col 72} = {res} 280
{txt}Group variable: {res}cname{col 56}{txt}Number of groups{col 72} = {res}  26
{txt}{col 56}Obs per group:
{col 69}min = {res}   3
{txt}{col 69}avg = {res}10.8
{txt}{col 69}max = {res}  21
{col 56}{txt}Wald chi2({res}0{txt}){col 72} = {res}   .
{txt}Log likelihood = {res}-683.60971{col 56}{txt}Prob > chi2{col 72} = {res}   .

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}    dydx_sex{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      z{col 46}   P>|z|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}_cons {c |}{col 14}{res}{space 2} -17.1559{col 26}{space 2} .7750096{col 37}{space 1}  -22.14{col 46}{space 3}0.000{col 54}{space 4}-18.67489{col 67}{space 3}-15.63691
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}{hline 29}{c TT}{hline 48}
{col 3}Random-effects parameters{col 30}{c |}{col 34}Estimate{col 45}Std. err.{col 59}[95% conf. interval]
{hline 29}{c +}{hline 48}
{res}cname{txt}: Identity{col 30}{c |}
{space 18}var(_cons) {c |}{res}{col 33} 14.89394{col 44} 4.376452{col 58} 8.373198{col 70} 26.49278
{txt}{hline 29}{c +}{hline 48}
{col 16}var(Residual){col 30}{c |}{res}{col 33} 5.733936{col 44} .5093396{col 58}  4.81772{col 70} 6.824396
{txt}{hline 29}{c BT}{hline 48}
LR test vs. linear model:{col 27}{help j_chibar##|_new:chibar2(01) =} {res}225.37{col 55}{txt}Prob >= chibar2 = {col 73}{res}0.0000

{txt}Intraclass correlation

{res}{col 1}{text}{hline 29}{c TT}{hline 12}{hline 12}{hline 12}{hline 12}
{col 1}{text}                       Level{col 30}{c |}        ICC{col 43}  Std. err.{col 55}    [95% conf. interval]
{res}{col 1}{text}{hline 29}{c +}{hline 12}{hline 12}{hline 12}{hline 12}
{col 1}{text}                       cname{col 30}{c |}{result}{space 2} .7220297{col 43}{space 1} .0619709{col 55}{space 3} .5864661{col 67}{space 3} .8263144
{col 1}{text}{hline 29}{c BT}{hline 12}{hline 12}{hline 12}{hline 12}
{res}
{txt}Performing EM optimization ...
{res}
{txt}Performing gradient-based optimization: 
{res}{txt}Iteration 0:{space 2}Log likelihood = {res:-663.02556}  
Iteration 1:{space 2}Log likelihood = {res:-663.02556}  
{res}
{txt}Computing standard errors ...
{res}
{txt}Mixed-effects ML regression{col 56}Number of obs{col 72} = {res} 280
{txt}Group variable: {res}cname{col 56}{txt}Number of groups{col 72} = {res}  26
{txt}{col 56}Obs per group:
{col 69}min = {res}   3
{txt}{col 69}avg = {res}10.8
{txt}{col 69}max = {res}  21
{col 56}{txt}Wald chi2({res}0{txt}){col 72} = {res}   .
{txt}Log likelihood = {res}-663.02556{col 56}{txt}Prob > chi2{col 72} = {res}   .

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1} dydx_mother{col 14}{c |} Coefficient{col 26}  Std. err.{col 38}      z{col 46}   P>|z|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}_cons {c |}{col 14}{res}{space 2}-6.582162{col 26}{space 2} .8928193{col 37}{space 1}   -7.37{col 46}{space 3}0.000{col 54}{space 4}-8.332056{col 67}{space 3}-4.832269
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}{hline 29}{c TT}{hline 48}
{col 3}Random-effects parameters{col 30}{c |}{col 34}Estimate{col 45}Std. err.{col 59}[95% conf. interval]
{hline 29}{c +}{hline 48}
{res}cname{txt}: Identity{col 30}{c |}
{space 18}var(_cons) {c |}{res}{col 33} 20.12521{col 44} 5.714065{col 58} 11.53619{col 70}   35.109
{txt}{hline 29}{c +}{hline 48}
{col 16}var(Residual){col 30}{c |}{res}{col 33} 4.736846{col 44} .4200723{col 58} 3.981101{col 70} 5.636058
{txt}{hline 29}{c BT}{hline 48}
LR test vs. linear model:{col 27}{help j_chibar##|_new:chibar2(01) =} {res}409.63{col 55}{txt}Prob >= chibar2 = {col 73}{res}0.0000

{txt}Intraclass correlation

{res}{col 1}{text}{hline 29}{c TT}{hline 12}{hline 12}{hline 12}{hline 12}
{col 1}{text}                       Level{col 30}{c |}        ICC{col 43}  Std. err.{col 55}    [95% conf. interval]
{res}{col 1}{text}{hline 29}{c +}{hline 12}{hline 12}{hline 12}{hline 12}
{col 1}{text}                       cname{col 30}{c |}{result}{space 2} .8094749{col 43}{space 1} .0459465{col 55}{space 3}  .703223{col 67}{space 3} .8839635
{col 1}{text}{hline 29}{c BT}{hline 12}{hline 12}{hline 12}{hline 12}
{res}{txt}
{com}. 
. *****************************************
. *Table 4
. *proceed with hc2 cluster, dfadjust
. *loop by sample; repeat for eight outcomes*
. *****************************************
. 
. estimates clear
{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_HP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_4.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain replace
{res}{txt}{p 0 4 2}
(file {bf}
Table_4.csv{rm}
not found)
{p_end}
(output written to {browse  `"Table_4.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_LP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_4.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_4.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_HC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_4.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_4.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_LC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_4.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_4.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_par_WH c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_4.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_4.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_par_WL c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_4.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_4.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_par_MH c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_4.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_4.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_par_ML c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_4.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_4.csv"'})

{com}. 
. *use sureg to test equality of coefficents*
. sureg (dydx_sex_HP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2) (dydx_sex_LP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2)(dydx_sex_HC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2)(dydx_sex_LC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2), vce(cluster cname)
{res}
{txt}Seemingly unrelated regression
{hline 78}
Equation             Obs   Params         RMSE  "R-squared"      chi2   P>chi2
{hline 78}
{res}dydx_sex_HP          280        7     3.691987      0.6123     224.27   0.0000
dydx_sex_LP          280        7     3.658537      0.6132     138.47   0.0000
dydx_sex_HC          280        7      3.60244      0.2099      13.13   0.0690
dydx_sex_LC          280        7     3.411876      0.1713      21.05   0.0037
{txt}{hline 78}

{res}{txt}{ralign 79:(Std. err. adjusted for {res:26} clusters in {res:cname})}
{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27}    Robust
{col 15}{c |} Coefficient{col 27}  std. err.{col 39}      z{col 47}   P>|z|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}dydx_sex_HP   {txt}{c |}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2} .2343391{col 27}{space 2} .3404342{col 38}{space 1}    0.69{col 47}{space 3}0.491{col 55}{space 4}-.4328996{col 68}{space 3} .9015778
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2}-.0792834{col 27}{space 2}  .219891{col 38}{space 1}   -0.36{col 47}{space 3}0.718{col 55}{space 4}-.5102619{col 68}{space 3} .3516951
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2}-.2620014{col 27}{space 2} .0483603{col 38}{space 1}   -5.42{col 47}{space 3}0.000{col 55}{space 4}-.3567858{col 68}{space 3}-.1672171
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2} 2.300623{col 27}{space 2} 1.950099{col 38}{space 1}    1.18{col 47}{space 3}0.238{col 55}{space 4}  -1.5215{col 68}{space 3} 6.122746
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}  -.33477{col 27}{space 2} .0425189{col 38}{space 1}   -7.87{col 47}{space 3}0.000{col 55}{space 4}-.4181055{col 68}{space 3}-.2514344
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2}-.1094595{col 27}{space 2} .1009312{col 38}{space 1}   -1.08{col 47}{space 3}0.278{col 55}{space 4}-.3072811{col 68}{space 3} .0883621
{txt}{space 8}year2 {c |}{col 15}{res}{space 2} .1615546{col 27}{space 2} .0887107{col 38}{space 1}    1.82{col 47}{space 3}0.069{col 55}{space 4}-.0123152{col 68}{space 3} .3354245
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-21.02933{col 27}{space 2} 1.070975{col 38}{space 1}  -19.64{col 47}{space 3}0.000{col 55}{space 4} -23.1284{col 68}{space 3}-18.93026
{txt}{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}dydx_sex_LP   {txt}{c |}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2} .6903269{col 27}{space 2} .2326299{col 38}{space 1}    2.97{col 47}{space 3}0.003{col 55}{space 4} .2343807{col 68}{space 3} 1.146273
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2}-.4436007{col 27}{space 2} .2875306{col 38}{space 1}   -1.54{col 47}{space 3}0.123{col 55}{space 4} -1.00715{col 68}{space 3} .1199489
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2} -.156865{col 27}{space 2} .0542452{col 38}{space 1}   -2.89{col 47}{space 3}0.004{col 55}{space 4}-.2631836{col 68}{space 3}-.0505464
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2}-.9168477{col 27}{space 2} 1.929443{col 38}{space 1}   -0.48{col 47}{space 3}0.635{col 55}{space 4}-4.698486{col 68}{space 3} 2.864791
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}-.3476495{col 27}{space 2} .0369917{col 38}{space 1}   -9.40{col 47}{space 3}0.000{col 55}{space 4}-.4201519{col 68}{space 3}-.2751471
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2}-.1700837{col 27}{space 2} .1045536{col 38}{space 1}   -1.63{col 47}{space 3}0.104{col 55}{space 4} -.375005{col 68}{space 3} .0348377
{txt}{space 8}year2 {c |}{col 15}{res}{space 2} .1391702{col 27}{space 2} .0917282{col 38}{space 1}    1.52{col 47}{space 3}0.129{col 55}{space 4}-.0406137{col 68}{space 3} .3189541
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-24.06347{col 27}{space 2} .9083363{col 38}{space 1}  -26.49{col 47}{space 3}0.000{col 55}{space 4}-25.84378{col 68}{space 3}-22.28317
{txt}{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}dydx_sex_HC   {txt}{c |}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2}-.3687384{col 27}{space 2} .3866901{col 38}{space 1}   -0.95{col 47}{space 3}0.340{col 55}{space 4}-1.126637{col 68}{space 3} .3891602
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2}  .304908{col 27}{space 2} .3607084{col 38}{space 1}    0.85{col 47}{space 3}0.398{col 55}{space 4}-.4020676{col 68}{space 3} 1.011884
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2}-.1787388{col 27}{space 2} .0696432{col 38}{space 1}   -2.57{col 47}{space 3}0.010{col 55}{space 4}-.3152369{col 68}{space 3}-.0422406
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2} 3.084198{col 27}{space 2} 3.244001{col 38}{space 1}    0.95{col 47}{space 3}0.342{col 55}{space 4}-3.273927{col 68}{space 3} 9.442322
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}-.0478004{col 27}{space 2} .0448648{col 38}{space 1}   -1.07{col 47}{space 3}0.287{col 55}{space 4}-.1357338{col 68}{space 3} .0401331
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2}-.0329705{col 27}{space 2} .1229463{col 38}{space 1}   -0.27{col 47}{space 3}0.789{col 55}{space 4}-.2739409{col 68}{space 3} .2079998
{txt}{space 8}year2 {c |}{col 15}{res}{space 2} .1124353{col 27}{space 2} .0791294{col 38}{space 1}    1.42{col 47}{space 3}0.155{col 55}{space 4}-.0426554{col 68}{space 3}  .267526
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-9.967685{col 27}{space 2} .9728452{col 38}{space 1}  -10.25{col 47}{space 3}0.000{col 55}{space 4}-11.87443{col 68}{space 3}-8.060944
{txt}{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}dydx_sex_LC   {txt}{c |}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2} .2141032{col 27}{space 2} .3255048{col 38}{space 1}    0.66{col 47}{space 3}0.511{col 55}{space 4}-.4238745{col 68}{space 3} .8520809
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2} .0299822{col 27}{space 2} .4062488{col 38}{space 1}    0.07{col 47}{space 3}0.941{col 55}{space 4}-.7662508{col 68}{space 3} .8262151
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2}-.0612345{col 27}{space 2} .0693821{col 38}{space 1}   -0.88{col 47}{space 3}0.377{col 55}{space 4}-.1972208{col 68}{space 3} .0747518
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2} -1.30458{col 27}{space 2} 2.775091{col 38}{space 1}   -0.47{col 47}{space 3}0.638{col 55}{space 4}-6.743659{col 68}{space 3} 4.134499
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}-.0079665{col 27}{space 2} .0313115{col 38}{space 1}   -0.25{col 47}{space 3}0.799{col 55}{space 4}-.0693359{col 68}{space 3} .0534029
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2} -.227402{col 27}{space 2} .1092919{col 38}{space 1}   -2.08{col 47}{space 3}0.037{col 55}{space 4}-.4416102{col 68}{space 3}-.0131938
{txt}{space 8}year2 {c |}{col 15}{res}{space 2} .0966582{col 27}{space 2} .0670747{col 38}{space 1}    1.44{col 47}{space 3}0.150{col 55}{space 4}-.0348058{col 68}{space 3} .2281222
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-12.64037{col 27}{space 2} .8841095{col 38}{space 1}  -14.30{col 47}{space 3}0.000{col 55}{space 4} -14.3732{col 68}{space 3}-10.90755
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. test [dydx_sex_HP]c_mospaid_H6  = [dydx_sex_LP]c_mospaid_H6

{p 0 7}{space 1}{text:( 1)}{space 1} {res}[dydx_sex_HP]c_mospaid_H6 - [dydx_sex_LP]c_mospaid_H6 = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    8.73
{txt}{col 10}Prob > chi2 =  {res}  0.0031
{txt}
{com}. * Prob > chi2 =    0.0031; tert parents>non-tert parents
. test [dydx_sex_HP]c_mospaid_H6  = [dydx_sex_HC]c_mospaid_H6

{p 0 7}{space 1}{text:( 1)}{space 1} {res}[dydx_sex_HP]c_mospaid_H6 - [dydx_sex_HC]c_mospaid_H6 = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    2.01
{txt}{col 10}Prob > chi2 =  {res}  0.1565
{txt}
{com}. *Prob > chi2 =    0.1565
. test [dydx_sex_LP]c_mospaid_H6  = [dydx_sex_LC]c_mospaid_H6

{p 0 7}{space 1}{text:( 1)}{space 1} {res}[dydx_sex_LP]c_mospaid_H6 - [dydx_sex_LC]c_mospaid_H6 = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    3.66
{txt}{col 10}Prob > chi2 =  {res}  0.0558
{txt}
{com}. *Prob > chi2 =    0.0558; MARG nontert parents>non-tert childless
. test [dydx_sex_HC]c_mospaid_H6  = [dydx_sex_LC]c_mospaid_H6

{p 0 7}{space 1}{text:( 1)}{space 1} {res}[dydx_sex_HC]c_mospaid_H6 - [dydx_sex_LC]c_mospaid_H6 = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    6.97
{txt}{col 10}Prob > chi2 =  {res}  0.0083
{txt}
{com}. *Prob > chi2 =    0.0083; tert childless>non-tert childless
. test [dydx_sex_HC]c_mospaid_H6  = [dydx_sex_LP]c_mospaid_H6

{p 0 7}{space 1}{text:( 1)}{space 1}{space 1}{res}- [dydx_sex_LP]c_mospaid_H6 + [dydx_sex_HC]c_mospaid_H6 = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    0.14
{txt}{col 10}Prob > chi2 =  {res}  0.7084
{txt}
{com}. *Prob > chi2 =    0.7084
. 
. 
. ****************************************
. *Table 3a:
. * REPEAT regression on 8 outcomes on REG.dta (not Heckman corrected) and each subsample
. *Add to first column of Table 3
. ****************************************
. 
. cd "$MyProject\tables"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\tables
{txt}
{com}. 
. use "$MyProject\data\REG.dta", clear
{txt}
{com}. 
. *Table 2: Survey-level Descriptives
. *one way*
. sum dydx_sex dydx_mother

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        280   -19.07705    4.321454   -29.0339    -8.7218
{txt}{space 1}dydx_mother {c |}{res}        280   -10.96906    6.594418   -26.7334     2.1234
{txt}
{com}. *three-way*
. sum dydx_sex_HP dydx_sex_LP dydx_sex_HC dydx_sex_LC dydx_par_WH dydx_par_WL dydx_par_MH dydx_par_ML      

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}dydx_sex_HP {c |}{res}        280   -23.12906    6.811006   -40.9901    -8.3189
{txt}{space 1}dydx_sex_LP {c |}{res}        280   -25.47111    6.311996   -38.6559   -10.1648
{txt}{space 1}dydx_sex_HC {c |}{res}        280   -9.285521    4.182255     -20.94     2.8448
{txt}{space 1}dydx_sex_LC {c |}{res}        280   -11.55146    3.925753   -23.3401     2.1168
{txt}{space 1}dydx_par_WH {c |}{res}        280   -9.260801    7.345593   -26.8867     9.6588
{txt}{hline 13}{c +}{hline 57}
{space 1}dydx_par_WL {c |}{res}        280   -11.91448    6.849315   -27.8149     1.1892
{txt}{space 1}dydx_par_MH {c |}{res}        280    4.582737     3.85569    -7.5953    15.8892
{txt}{space 1}dydx_par_ML {c |}{res}        280    2.005174    3.143319    -8.1735    11.7001
{txt}
{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_3.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_3.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_mother c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_3.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_3.csv"'})

{com}. 
. 
. local varlist REG 
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.         use "$MyProject\data/`var'.dta", clear
{txt}  3{com}. estimates clear
{txt}  4{com}. qui reg dydx_sex_HP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}  5{com}.         eststo m_sex_HP
{txt}  6{com}.         esttab m* using Table_3a.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain replace
{txt}  7{com}. estimates clear  
{txt}  8{com}. qui reg dydx_sex_LP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}  9{com}.         eststo m_sex_LP
{txt} 10{com}.         esttab m* using Table_3a.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt} 11{com}. estimates clear  
{txt} 12{com}. qui reg dydx_sex_HC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt} 13{com}.         eststo m_sex_HC
{txt} 14{com}.         esttab m* using Table_3a.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt} 15{com}. estimates clear  
{txt} 16{com}. qui reg dydx_sex_LC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt} 17{com}.         eststo m_sex_LC
{txt} 18{com}.         esttab m* using Table_3a.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt} 19{com}. estimates clear  
{txt} 20{com}. qui reg dydx_par_WH c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt} 21{com}.         eststo m_par_WH
{txt} 22{com}.         esttab m* using Table_3a.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt} 23{com}. estimates clear  
{txt} 24{com}. qui reg dydx_par_WL c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt} 25{com}.         eststo m_par_WL
{txt} 26{com}.         esttab m* using Table_3a.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt} 27{com}. estimates clear  
{txt} 28{com}. qui reg dydx_par_MH c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt} 29{com}.         eststo m_par_MH
{txt} 30{com}.         esttab m* using Table_3a.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt} 31{com}. estimates clear  
{txt} 32{com}. qui reg dydx_par_ML c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt} 33{com}.         eststo m_par_ML
{txt} 34{com}.         esttab m* using Table_3a.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt} 35{com}. estimates clear  
{txt} 36{com}.    {c )-}
{res}{txt}{p 0 4 2}
(file {bf}
Table_3a.csv{rm}
not found)
{p_end}
(output written to {browse  `"Table_3a.csv"'})
{res}{txt}(output written to {browse  `"Table_3a.csv"'})
{res}{txt}(output written to {browse  `"Table_3a.csv"'})
{res}{txt}(output written to {browse  `"Table_3a.csv"'})
{res}{txt}(output written to {browse  `"Table_3a.csv"'})
{res}{txt}(output written to {browse  `"Table_3a.csv"'})
{res}{txt}(output written to {browse  `"Table_3a.csv"'})
{res}{txt}(output written to {browse  `"Table_3a.csv"'})
{res}{txt}
{com}. 
. 
. **TABLE 4***   
.    
. cd "$MyProject\tables"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\tables
{txt}
{com}. use "$MyProject\data\HECK.dta", clear 
{txt}
{com}.    
. *Table 4: Add variables to HECK Model for outcomes of interest*
. local varlist HECK FT WH OCC PUB EXP FT_OCC 
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.         use "$MyProject\data/`var'.dta", clear
{txt}  3{com}. estimates clear
{txt}  4{com}. qui reg dydx_sex_HP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}  5{com}.         eststo m_sex_HP
{txt}  6{com}. qui reg dydx_sex_LP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}  7{com}.         eststo m_sex_LP
{txt}  8{com}. qui reg dydx_sex_HC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}  9{com}.         eststo m_sex_HC
{txt} 10{com}. qui reg dydx_sex_LC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt} 11{com}.         eststo m_sex_LC
{txt} 12{com}. qui reg dydx_par_WH c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt} 13{com}.         eststo m_par_WH
{txt} 14{com}. qui reg dydx_par_WL c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt} 15{com}.         eststo m_par_WL
{txt} 16{com}. /*
> qui reg dydx_par_MH c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
>         eststo m_par_MH
> qui reg dydx_par_ML c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
>         eststo m_par_ML
> */
. esttab m* using Table_4.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt} 17{com}.    {c )-}
{res}{txt}(output written to {browse  `"Table_4.csv"'})
{res}{txt}(output written to {browse  `"Table_4.csv"'})
{res}{txt}(output written to {browse  `"Table_4.csv"'})
{res}{txt}(output written to {browse  `"Table_4.csv"'})
{res}{txt}(output written to {browse  `"Table_4.csv"'})
{res}{txt}(output written to {browse  `"Table_4.csv"'})
{res}{txt}(output written to {browse  `"Table_4.csv"'})

{com}. 
. *for text in paper that accompanies T4*  
. use "$MyProject\data/HECK.dta", clear  
{txt}
{com}. *use sureg to test equality of coefficents*
. sureg (dydx_sex_HP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2) (dydx_sex_LP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2)(dydx_sex_HC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2)(dydx_sex_LC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2), vce(cluster cname)
{res}
{txt}Seemingly unrelated regression
{hline 78}
Equation             Obs   Params         RMSE  "R-squared"      chi2   P>chi2
{hline 78}
{res}dydx_sex_HP          280        7     3.691987      0.6123     224.27   0.0000
dydx_sex_LP          280        7     3.658537      0.6132     138.47   0.0000
dydx_sex_HC          280        7      3.60244      0.2099      13.13   0.0690
dydx_sex_LC          280        7     3.411876      0.1713      21.05   0.0037
{txt}{hline 78}

{res}{txt}{ralign 79:(Std. err. adjusted for {res:26} clusters in {res:cname})}
{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27}    Robust
{col 15}{c |} Coefficient{col 27}  std. err.{col 39}      z{col 47}   P>|z|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}dydx_sex_HP   {txt}{c |}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2} .2343391{col 27}{space 2} .3404342{col 38}{space 1}    0.69{col 47}{space 3}0.491{col 55}{space 4}-.4328996{col 68}{space 3} .9015778
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2}-.0792834{col 27}{space 2}  .219891{col 38}{space 1}   -0.36{col 47}{space 3}0.718{col 55}{space 4}-.5102619{col 68}{space 3} .3516951
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2}-.2620014{col 27}{space 2} .0483603{col 38}{space 1}   -5.42{col 47}{space 3}0.000{col 55}{space 4}-.3567858{col 68}{space 3}-.1672171
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2} 2.300623{col 27}{space 2} 1.950099{col 38}{space 1}    1.18{col 47}{space 3}0.238{col 55}{space 4}  -1.5215{col 68}{space 3} 6.122746
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}  -.33477{col 27}{space 2} .0425189{col 38}{space 1}   -7.87{col 47}{space 3}0.000{col 55}{space 4}-.4181055{col 68}{space 3}-.2514344
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2}-.1094595{col 27}{space 2} .1009312{col 38}{space 1}   -1.08{col 47}{space 3}0.278{col 55}{space 4}-.3072811{col 68}{space 3} .0883621
{txt}{space 8}year2 {c |}{col 15}{res}{space 2} .1615546{col 27}{space 2} .0887107{col 38}{space 1}    1.82{col 47}{space 3}0.069{col 55}{space 4}-.0123152{col 68}{space 3} .3354245
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-21.02933{col 27}{space 2} 1.070975{col 38}{space 1}  -19.64{col 47}{space 3}0.000{col 55}{space 4} -23.1284{col 68}{space 3}-18.93026
{txt}{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}dydx_sex_LP   {txt}{c |}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2} .6903269{col 27}{space 2} .2326299{col 38}{space 1}    2.97{col 47}{space 3}0.003{col 55}{space 4} .2343807{col 68}{space 3} 1.146273
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2}-.4436007{col 27}{space 2} .2875306{col 38}{space 1}   -1.54{col 47}{space 3}0.123{col 55}{space 4} -1.00715{col 68}{space 3} .1199489
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2} -.156865{col 27}{space 2} .0542452{col 38}{space 1}   -2.89{col 47}{space 3}0.004{col 55}{space 4}-.2631836{col 68}{space 3}-.0505464
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2}-.9168477{col 27}{space 2} 1.929443{col 38}{space 1}   -0.48{col 47}{space 3}0.635{col 55}{space 4}-4.698486{col 68}{space 3} 2.864791
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}-.3476495{col 27}{space 2} .0369917{col 38}{space 1}   -9.40{col 47}{space 3}0.000{col 55}{space 4}-.4201519{col 68}{space 3}-.2751471
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2}-.1700837{col 27}{space 2} .1045536{col 38}{space 1}   -1.63{col 47}{space 3}0.104{col 55}{space 4} -.375005{col 68}{space 3} .0348377
{txt}{space 8}year2 {c |}{col 15}{res}{space 2} .1391702{col 27}{space 2} .0917282{col 38}{space 1}    1.52{col 47}{space 3}0.129{col 55}{space 4}-.0406137{col 68}{space 3} .3189541
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-24.06347{col 27}{space 2} .9083363{col 38}{space 1}  -26.49{col 47}{space 3}0.000{col 55}{space 4}-25.84378{col 68}{space 3}-22.28317
{txt}{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}dydx_sex_HC   {txt}{c |}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2}-.3687384{col 27}{space 2} .3866901{col 38}{space 1}   -0.95{col 47}{space 3}0.340{col 55}{space 4}-1.126637{col 68}{space 3} .3891602
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2}  .304908{col 27}{space 2} .3607084{col 38}{space 1}    0.85{col 47}{space 3}0.398{col 55}{space 4}-.4020676{col 68}{space 3} 1.011884
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2}-.1787388{col 27}{space 2} .0696432{col 38}{space 1}   -2.57{col 47}{space 3}0.010{col 55}{space 4}-.3152369{col 68}{space 3}-.0422406
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2} 3.084198{col 27}{space 2} 3.244001{col 38}{space 1}    0.95{col 47}{space 3}0.342{col 55}{space 4}-3.273927{col 68}{space 3} 9.442322
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}-.0478004{col 27}{space 2} .0448648{col 38}{space 1}   -1.07{col 47}{space 3}0.287{col 55}{space 4}-.1357338{col 68}{space 3} .0401331
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2}-.0329705{col 27}{space 2} .1229463{col 38}{space 1}   -0.27{col 47}{space 3}0.789{col 55}{space 4}-.2739409{col 68}{space 3} .2079998
{txt}{space 8}year2 {c |}{col 15}{res}{space 2} .1124353{col 27}{space 2} .0791294{col 38}{space 1}    1.42{col 47}{space 3}0.155{col 55}{space 4}-.0426554{col 68}{space 3}  .267526
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-9.967685{col 27}{space 2} .9728452{col 38}{space 1}  -10.25{col 47}{space 3}0.000{col 55}{space 4}-11.87443{col 68}{space 3}-8.060944
{txt}{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}dydx_sex_LC   {txt}{c |}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2} .2141032{col 27}{space 2} .3255048{col 38}{space 1}    0.66{col 47}{space 3}0.511{col 55}{space 4}-.4238745{col 68}{space 3} .8520809
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2} .0299822{col 27}{space 2} .4062488{col 38}{space 1}    0.07{col 47}{space 3}0.941{col 55}{space 4}-.7662508{col 68}{space 3} .8262151
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2}-.0612345{col 27}{space 2} .0693821{col 38}{space 1}   -0.88{col 47}{space 3}0.377{col 55}{space 4}-.1972208{col 68}{space 3} .0747518
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2} -1.30458{col 27}{space 2} 2.775091{col 38}{space 1}   -0.47{col 47}{space 3}0.638{col 55}{space 4}-6.743659{col 68}{space 3} 4.134499
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}-.0079665{col 27}{space 2} .0313115{col 38}{space 1}   -0.25{col 47}{space 3}0.799{col 55}{space 4}-.0693359{col 68}{space 3} .0534029
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2} -.227402{col 27}{space 2} .1092919{col 38}{space 1}   -2.08{col 47}{space 3}0.037{col 55}{space 4}-.4416102{col 68}{space 3}-.0131938
{txt}{space 8}year2 {c |}{col 15}{res}{space 2} .0966582{col 27}{space 2} .0670747{col 38}{space 1}    1.44{col 47}{space 3}0.150{col 55}{space 4}-.0348058{col 68}{space 3} .2281222
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-12.64037{col 27}{space 2} .8841095{col 38}{space 1}  -14.30{col 47}{space 3}0.000{col 55}{space 4} -14.3732{col 68}{space 3}-10.90755
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. *test HP vs LP
. test [dydx_sex_HP]c_mospaid_H6  = [dydx_sex_LP]c_mospaid_H6

{p 0 7}{space 1}{text:( 1)}{space 1} {res}[dydx_sex_HP]c_mospaid_H6 - [dydx_sex_LP]c_mospaid_H6 = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    8.73
{txt}{col 10}Prob > chi2 =  {res}  0.0031
{txt}
{com}. * Prob > chi2 =    0.0031; tert parents>non-tert parents
. *test HP vs HC
. test [dydx_sex_HP]c_mospaid_H6  = [dydx_sex_HC]c_mospaid_H6

{p 0 7}{space 1}{text:( 1)}{space 1} {res}[dydx_sex_HP]c_mospaid_H6 - [dydx_sex_HC]c_mospaid_H6 = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    2.01
{txt}{col 10}Prob > chi2 =  {res}  0.1565
{txt}
{com}. *Prob > chi2 =    0.1565
. *test LP vs LC
. test [dydx_sex_LP]c_mospaid_H6  = [dydx_sex_LC]c_mospaid_H6

{p 0 7}{space 1}{text:( 1)}{space 1} {res}[dydx_sex_LP]c_mospaid_H6 - [dydx_sex_LC]c_mospaid_H6 = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    3.66
{txt}{col 10}Prob > chi2 =  {res}  0.0558
{txt}
{com}. *Prob > chi2 =    0.0558; MARG nontert parents>non-tert childless
. *test HC vs LC
. test [dydx_sex_HC]c_mospaid_H6  = [dydx_sex_LC]c_mospaid_H6

{p 0 7}{space 1}{text:( 1)}{space 1} {res}[dydx_sex_HC]c_mospaid_H6 - [dydx_sex_LC]c_mospaid_H6 = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    6.97
{txt}{col 10}Prob > chi2 =  {res}  0.0083
{txt}
{com}. *Prob > chi2 =    0.0083; tert childless>non-tert childless
. *test HC vs LP
. test [dydx_sex_HC]c_mospaid_H6  = [dydx_sex_LP]c_mospaid_H6

{p 0 7}{space 1}{text:( 1)}{space 1}{space 1}{res}- [dydx_sex_LP]c_mospaid_H6 + [dydx_sex_HC]c_mospaid_H6 = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    0.14
{txt}{col 10}Prob > chi2 =  {res}  0.7084
{txt}
{com}. *Prob > chi2 =    0.7084
. 
. *marginal effects and predicted values*
. qui reg dydx_sex_HP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. margins, dydx(c_mospaid_H6)
{res}
{txt}{col 1}Average marginal effects{col 60}{lalign 13:Number of obs}{col 73} = {res}{ralign 3:280}
{txt}{col 1}Model VCE: {res:Robust HC2}

{txt}{p2colset 1 13 13 2}{...}
{p2col:Expression:}{res:Linear prediction, predict()}{p_end}
{p2col:dy/dx wrt:}{res:c_mospaid_H6}{p_end}
{p2colreset}{...}

{res}{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26} Delta-method
{col 14}{c |}      dy/dx{col 26}   std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
c_mospaid_H6 {c |}{col 14}{res}{space 2}-.2620014{col 26}{space 2} .0549035{col 37}{space 1}   -4.77{col 46}{space 3}0.000{col 54}{space 4}-.3750772{col 67}{space 3}-.1489256
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. margins, at(c_mospaid_H6=(-7.47 0 10.5 21 35.9))
{res}
{txt}{col 1}Predictive margins{col 60}{lalign 13:Number of obs}{col 73} = {res}{ralign 3:280}
{txt}{col 1}Model VCE: {res:Robust HC2}

{txt}{p2colset 1 13 13 2}{...}
{p2col:Expression:}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{lalign 7:1._at: }{space 0}{lalign 12:c_mospaid_H6} = {res:{ralign 5:-7.47}}
{lalign 7:2._at: }{space 0}{lalign 12:c_mospaid_H6} = {res:{ralign 5:0}}
{lalign 7:3._at: }{space 0}{lalign 12:c_mospaid_H6} = {res:{ralign 5:10.5}}
{lalign 7:4._at: }{space 0}{lalign 12:c_mospaid_H6} = {res:{ralign 5:21}}
{lalign 7:5._at: }{space 0}{lalign 12:c_mospaid_H6} = {res:{ralign 5:35.9}}

{res}{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26} Delta-method
{col 14}{c |}     Margin{col 26}   std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}_at {c |}
{space 10}1  {c |}{col 14}{res}{space 2}-17.36489{col 26}{space 2} .6805813{col 37}{space 1}  -25.51{col 46}{space 3}0.000{col 54}{space 4}-18.76658{col 67}{space 3}-15.96321
{txt}{space 10}2  {c |}{col 14}{res}{space 2}-19.32204{col 26}{space 2} .5442991{col 37}{space 1}  -35.50{col 46}{space 3}0.000{col 54}{space 4}-20.44305{col 67}{space 3}-18.20104
{txt}{space 10}3  {c |}{col 14}{res}{space 2}-22.07306{col 26}{space 2} .7939722{col 37}{space 1}  -27.80{col 46}{space 3}0.000{col 54}{space 4}-23.70827{col 67}{space 3}-20.43784
{txt}{space 10}4  {c |}{col 14}{res}{space 2}-24.82407{col 26}{space 2} 1.276399{col 37}{space 1}  -19.45{col 46}{space 3}0.000{col 54}{space 4}-27.45287{col 67}{space 3}-22.19528
{txt}{space 10}5  {c |}{col 14}{res}{space 2} -28.7279{col 26}{space 2} 2.046307{col 37}{space 1}  -14.04{col 46}{space 3}0.000{col 54}{space 4}-32.94234{col 67}{space 3}-24.51345
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. 
. qui reg dydx_sex_LP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. margins, dydx(c_mospaid_H6)
{res}
{txt}{col 1}Average marginal effects{col 60}{lalign 13:Number of obs}{col 73} = {res}{ralign 3:280}
{txt}{col 1}Model VCE: {res:Robust HC2}

{txt}{p2colset 1 13 13 2}{...}
{p2col:Expression:}{res:Linear prediction, predict()}{p_end}
{p2col:dy/dx wrt:}{res:c_mospaid_H6}{p_end}
{p2colreset}{...}

{res}{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26} Delta-method
{col 14}{c |}      dy/dx{col 26}   std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
c_mospaid_H6 {c |}{col 14}{res}{space 2} -.156865{col 26}{space 2} .0618265{col 37}{space 1}   -2.54{col 46}{space 3}0.018{col 54}{space 4}-.2841991{col 67}{space 3}-.0295309
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. margins, at(c_mospaid_H6=(-7.47 0 10.5 21 35.9))  
{res}
{txt}{col 1}Predictive margins{col 60}{lalign 13:Number of obs}{col 73} = {res}{ralign 3:280}
{txt}{col 1}Model VCE: {res:Robust HC2}

{txt}{p2colset 1 13 13 2}{...}
{p2col:Expression:}{res:Linear prediction, predict()}{p_end}
{p2colreset}{...}
{lalign 7:1._at: }{space 0}{lalign 12:c_mospaid_H6} = {res:{ralign 5:-7.47}}
{lalign 7:2._at: }{space 0}{lalign 12:c_mospaid_H6} = {res:{ralign 5:0}}
{lalign 7:3._at: }{space 0}{lalign 12:c_mospaid_H6} = {res:{ralign 5:10.5}}
{lalign 7:4._at: }{space 0}{lalign 12:c_mospaid_H6} = {res:{ralign 5:21}}
{lalign 7:5._at: }{space 0}{lalign 12:c_mospaid_H6} = {res:{ralign 5:35.9}}

{res}{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26} Delta-method
{col 14}{c |}     Margin{col 26}   std. err.{col 38}      t{col 46}   P>|t|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}_at {c |}
{space 10}1  {c |}{col 14}{res}{space 2}-21.42096{col 26}{space 2} .6616295{col 37}{space 1}  -32.38{col 46}{space 3}0.000{col 54}{space 4}-22.78361{col 67}{space 3}-20.05831
{txt}{space 10}2  {c |}{col 14}{res}{space 2}-22.59274{col 26}{space 2}  .491109{col 37}{space 1}  -46.00{col 46}{space 3}0.000{col 54}{space 4} -23.6042{col 67}{space 3}-21.58128
{txt}{space 10}3  {c |}{col 14}{res}{space 2}-24.23982{col 26}{space 2} .8283373{col 37}{space 1}  -29.26{col 46}{space 3}0.000{col 54}{space 4}-25.94582{col 67}{space 3}-22.53383
{txt}{space 10}4  {c |}{col 14}{res}{space 2}-25.88691{col 26}{space 2} 1.404978{col 37}{space 1}  -18.43{col 46}{space 3}0.000{col 54}{space 4}-28.78051{col 67}{space 3} -22.9933
{txt}{space 10}5  {c |}{col 14}{res}{space 2}-28.22419{col 26}{space 2} 2.290875{col 37}{space 1}  -12.32{col 46}{space 3}0.000{col 54}{space 4}-32.94234{col 67}{space 3}-23.50605
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.    
. 
. *******************
. *Figure 2 coeff plots*
. *Keep estimate and confidence interval for c_mospaid_H6
. *For 4 regressions: dydx_sex_HP dydx_sex_LP dydx_sex_HC dydx_sex_LC
. *******************
. 
. *loop by sample; repeat for 4 groups*
. cd "$MyProject\tables"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\tables
{txt}
{com}. estimates clear
{res}{txt}
{com}. use "$MyProject\data\HECK.dta", clear
{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_HP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}. 
. etable, estimate(m*) keep(c_mospaid_H6) cstat(_r_b) cstat(_r_lb) cstat(_r_ub) column(estimates) export(Fig2_coefplot_data_HP.txt) replace   
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
{space 22} m_Sample_all m_Sample_FT m_Sample_WH m_Sample_OCC m_Sample_Public m_Sample_EXP m_Sample_FT_OCC
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
Grand mean centered{space 3} {space 6}{result:-0.262} {space 5}{result:-0.302} {space 5}{result:-0.307} {space 6}{result:-0.264} {space 9}{result:-0.249} {space 6}{result:-0.331} {space 9}{result:-0.290}
{space 22} {space 6}{result:-0.382} {space 5}{result:-0.439} {space 5}{result:-0.462} {space 6}{result:-0.392} {space 9}{result:-0.452} {space 6}{result:-0.572} {space 9}{result:-0.446}
{space 22} {space 6}{result:-0.142} {space 5}{result:-0.164} {space 5}{result:-0.152} {space 6}{result:-0.136} {space 9}{result:-0.045} {space 6}{result:-0.090} {space 9}{result:-0.134}
Number of observations {space 9}{result:280} {space 8}{result:236} {space 8}{result:217} {space 9}{result:220} {space 12}{result:159} {space 9}{result:113} {space 12}{result:197}
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HP.txt":Fig2_coefplot_data_HP.txt})
{p_end}

{com}.    
. 
. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_LP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}. 
. etable, estimate(m*) keep(c_mospaid_H6) cstat(_r_b) cstat(_r_lb) cstat(_r_ub) column(estimates) export(Fig2_coefplot_data_LP.txt) replace 
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
{space 22} m_Sample_all m_Sample_FT m_Sample_WH m_Sample_OCC m_Sample_Public m_Sample_EXP m_Sample_FT_OCC
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
Grand mean centered{space 3} {space 6}{result:-0.157} {space 5}{result:-0.212} {space 5}{result:-0.241} {space 6}{result:-0.161} {space 9}{result:-0.155} {space 6}{result:-0.290} {space 9}{result:-0.208}
{space 22} {space 6}{result:-0.291} {space 5}{result:-0.307} {space 5}{result:-0.328} {space 6}{result:-0.319} {space 9}{result:-0.321} {space 6}{result:-0.479} {space 9}{result:-0.313}
{space 22} {space 6}{result:-0.022} {space 5}{result:-0.117} {space 5}{result:-0.154} {space 6}{result:-0.004} {space 10}{result:0.010} {space 6}{result:-0.101} {space 9}{result:-0.104}
Number of observations {space 9}{result:280} {space 8}{result:236} {space 8}{result:217} {space 9}{result:220} {space 12}{result:159} {space 9}{result:113} {space 12}{result:197}
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LP.txt":Fig2_coefplot_data_LP.txt})
{p_end}

{com}. 
. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_HC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}. 
. etable, estimate(m*) keep(c_mospaid_H6) cstat(_r_b) cstat(_r_lb) cstat(_r_ub) column(estimates) export(Fig2_coefplot_data_HC.txt) replace 
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
{space 22} m_Sample_all m_Sample_FT m_Sample_WH m_Sample_OCC m_Sample_Public m_Sample_EXP m_Sample_FT_OCC
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
Grand mean centered{space 3} {space 6}{result:-0.179} {space 5}{result:-0.241} {space 5}{result:-0.235} {space 6}{result:-0.204} {space 9}{result:-0.048} {space 6}{result:-0.236} {space 9}{result:-0.260}
{space 22} {space 6}{result:-0.360} {space 5}{result:-0.447} {space 5}{result:-0.461} {space 6}{result:-0.406} {space 9}{result:-0.318} {space 6}{result:-0.596} {space 9}{result:-0.464}
{space 22} {space 7}{result:0.003} {space 5}{result:-0.036} {space 5}{result:-0.009} {space 6}{result:-0.002} {space 10}{result:0.222} {space 7}{result:0.124} {space 9}{result:-0.056}
Number of observations {space 9}{result:280} {space 8}{result:236} {space 8}{result:217} {space 9}{result:220} {space 12}{result:159} {space 9}{result:113} {space 12}{result:197}
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HC.txt":Fig2_coefplot_data_HC.txt})
{p_end}

{com}. 
. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_LC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}. 
. etable, estimate(m*) keep(c_mospaid_H6) cstat(_r_b) cstat(_r_lb) cstat(_r_ub) column(estimates) export(Fig2_coefplot_data_LC.txt) replace 
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
{space 22} m_Sample_all m_Sample_FT m_Sample_WH m_Sample_OCC m_Sample_Public m_Sample_EXP m_Sample_FT_OCC
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
Grand mean centered{space 3} {space 6}{result:-0.061} {space 5}{result:-0.110} {space 5}{result:-0.120} {space 6}{result:-0.069} {space 9}{result:-0.025} {space 6}{result:-0.138} {space 9}{result:-0.122}
{space 22} {space 6}{result:-0.236} {space 5}{result:-0.299} {space 5}{result:-0.315} {space 6}{result:-0.260} {space 9}{result:-0.294} {space 6}{result:-0.401} {space 9}{result:-0.312}
{space 22} {space 7}{result:0.113} {space 6}{result:0.079} {space 6}{result:0.075} {space 7}{result:0.122} {space 10}{result:0.243} {space 7}{result:0.125} {space 10}{result:0.067}
Number of observations {space 9}{result:280} {space 8}{result:236} {space 8}{result:217} {space 9}{result:220} {space 12}{result:159} {space 9}{result:113} {space 12}{result:197}
{hline 22}{c -}{hline 12}{c -}{hline 11}{c -}{hline 11}{c -}{hline 12}{c -}{hline 15}{c -}{hline 12}{c -}{hline 15}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LC.txt":Fig2_coefplot_data_LC.txt})
{p_end}

{com}. 
. ****************************************
. * REPEAT regression on 4 outcomes on on each subsample
. ****************************************
. 
. *appends above datasets after each model*
. estimates clear
{res}{txt}
{com}. local varlist FT WH OCC PUB EXP FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.         use "$MyProject\data/`var'.dta", clear
{txt}  3{com}. estimates clear
{txt}  4{com}. qui reg dydx_sex_HP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}  5{com}.         eststo m_`var'_HP
{txt}  6{com}.         etable, estimate(m_`var'_HP) keep(c_mospaid_H6) cstat(_r_b) cstat(_r_lb) cstat(_r_ub) column(estimates) export(Fig2_coefplot_data_HP.txt, append) 
{txt}  7{com}. qui reg dydx_sex_LP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}  8{com}.         eststo m_`var'_LP
{txt}  9{com}.         etable, estimate(m_`var'_LP) keep(c_mospaid_H6) cstat(_r_b) cstat(_r_lb) cstat(_r_ub) column(estimates) export(Fig2_coefplot_data_LP.txt, append) 
{txt} 10{com}. qui reg dydx_sex_HC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt} 11{com}.         eststo m_`var'_HC
{txt} 12{com}.         etable, estimate(m_`var'_HC) keep(c_mospaid_H6) cstat(_r_b) cstat(_r_lb) cstat(_r_ub) column(estimates) export(Fig2_coefplot_data_HC.txt, append) 
{txt} 13{com}. qui reg dydx_sex_LC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt} 14{com}.         eststo m_`var'_LC
{txt} 15{com}.         etable, estimate(m_`var'_LC) keep(c_mospaid_H6) cstat(_r_b) cstat(_r_lb) cstat(_r_ub) column(estimates) export(Fig2_coefplot_data_LC.txt, append) 
{txt} 16{com}.    {c )-}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 7}
{space 22} m_FT_HP
{hline 22}{c -}{hline 7}
Grand mean centered{space 3} {space 1}{result:-0.270}
{space 22} {space 1}{result:-0.371}
{space 22} {space 1}{result:-0.168}
Number of observations {space 4}{result:236}
{hline 22}{c -}{hline 7}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HP.txt":Fig2_coefplot_data_HP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 7}
{space 22} m_FT_LP
{hline 22}{c -}{hline 7}
Grand mean centered{space 3} {space 1}{result:-0.294}
{space 22} {space 1}{result:-0.400}
{space 22} {space 1}{result:-0.188}
Number of observations {space 4}{result:236}
{hline 22}{c -}{hline 7}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LP.txt":Fig2_coefplot_data_LP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 7}
{space 22} m_FT_HC
{hline 22}{c -}{hline 7}
Grand mean centered{space 3} {space 1}{result:-0.206}
{space 22} {space 1}{result:-0.375}
{space 22} {space 1}{result:-0.037}
Number of observations {space 4}{result:236}
{hline 22}{c -}{hline 7}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HC.txt":Fig2_coefplot_data_HC.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 7}
{space 22} m_FT_LC
{hline 22}{c -}{hline 7}
Grand mean centered{space 3} {space 1}{result:-0.124}
{space 22} {space 1}{result:-0.243}
{space 22} {space 1}{result:-0.005}
Number of observations {space 4}{result:236}
{hline 22}{c -}{hline 7}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LC.txt":Fig2_coefplot_data_LC.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 7}
{space 22} m_WH_HP
{hline 22}{c -}{hline 7}
Grand mean centered{space 3} {space 1}{result:-0.316}
{space 22} {space 1}{result:-0.479}
{space 22} {space 1}{result:-0.153}
Number of observations {space 4}{result:217}
{hline 22}{c -}{hline 7}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HP.txt":Fig2_coefplot_data_HP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 7}
{space 22} m_WH_LP
{hline 22}{c -}{hline 7}
Grand mean centered{space 3} {space 1}{result:-0.284}
{space 22} {space 1}{result:-0.406}
{space 22} {space 1}{result:-0.163}
Number of observations {space 4}{result:217}
{hline 22}{c -}{hline 7}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LP.txt":Fig2_coefplot_data_LP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 7}
{space 22} m_WH_HC
{hline 22}{c -}{hline 7}
Grand mean centered{space 3} {space 1}{result:-0.239}
{space 22} {space 1}{result:-0.448}
{space 22} {space 1}{result:-0.029}
Number of observations {space 4}{result:217}
{hline 22}{c -}{hline 7}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HC.txt":Fig2_coefplot_data_HC.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 7}
{space 22} m_WH_LC
{hline 22}{c -}{hline 7}
Grand mean centered{space 3} {space 1}{result:-0.133}
{space 22} {space 1}{result:-0.298}
{space 22} {space 2}{result:0.031}
Number of observations {space 4}{result:217}
{hline 22}{c -}{hline 7}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LC.txt":Fig2_coefplot_data_LC.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_OCC_HP
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.240}
{space 22} {space 2}{result:-0.352}
{space 22} {space 2}{result:-0.128}
Number of observations {space 5}{result:220}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HP.txt":Fig2_coefplot_data_HP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_OCC_LP
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.220}
{space 22} {space 2}{result:-0.368}
{space 22} {space 2}{result:-0.072}
Number of observations {space 5}{result:220}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LP.txt":Fig2_coefplot_data_LP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_OCC_HC
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.163}
{space 22} {space 2}{result:-0.320}
{space 22} {space 2}{result:-0.007}
Number of observations {space 5}{result:220}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HC.txt":Fig2_coefplot_data_HC.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_OCC_LC
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.109}
{space 22} {space 2}{result:-0.268}
{space 22} {space 3}{result:0.050}
Number of observations {space 5}{result:220}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LC.txt":Fig2_coefplot_data_LC.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_PUB_HP
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.230}
{space 22} {space 2}{result:-0.412}
{space 22} {space 2}{result:-0.049}
Number of observations {space 5}{result:159}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HP.txt":Fig2_coefplot_data_HP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_PUB_LP
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.136}
{space 22} {space 2}{result:-0.297}
{space 22} {space 3}{result:0.025}
Number of observations {space 5}{result:159}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LP.txt":Fig2_coefplot_data_LP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_PUB_HC
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.028}
{space 22} {space 2}{result:-0.290}
{space 22} {space 3}{result:0.235}
Number of observations {space 5}{result:159}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HC.txt":Fig2_coefplot_data_HC.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_PUB_LC
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.013}
{space 22} {space 2}{result:-0.279}
{space 22} {space 3}{result:0.254}
Number of observations {space 5}{result:159}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LC.txt":Fig2_coefplot_data_LC.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_EXP_HP
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.313}
{space 22} {space 2}{result:-0.573}
{space 22} {space 2}{result:-0.053}
Number of observations {space 5}{result:113}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HP.txt":Fig2_coefplot_data_HP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_EXP_LP
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.314}
{space 22} {space 2}{result:-0.538}
{space 22} {space 2}{result:-0.091}
Number of observations {space 5}{result:113}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LP.txt":Fig2_coefplot_data_LP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_EXP_HC
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.227}
{space 22} {space 2}{result:-0.593}
{space 22} {space 3}{result:0.140}
Number of observations {space 5}{result:113}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HC.txt":Fig2_coefplot_data_HC.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 8}
{space 22} m_EXP_LC
{hline 22}{c -}{hline 8}
Grand mean centered{space 3} {space 2}{result:-0.164}
{space 22} {space 2}{result:-0.419}
{space 22} {space 3}{result:0.090}
Number of observations {space 5}{result:113}
{hline 22}{c -}{hline 8}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LC.txt":Fig2_coefplot_data_LC.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 11}
{space 22} m_FT_OCC_HP
{hline 22}{c -}{hline 11}
Grand mean centered{space 3} {space 5}{result:-0.234}
{space 22} {space 5}{result:-0.345}
{space 22} {space 5}{result:-0.122}
Number of observations {space 8}{result:197}
{hline 22}{c -}{hline 11}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HP.txt":Fig2_coefplot_data_HP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 11}
{space 22} m_FT_OCC_LP
{hline 22}{c -}{hline 11}
Grand mean centered{space 3} {space 5}{result:-0.331}
{space 22} {space 5}{result:-0.472}
{space 22} {space 5}{result:-0.190}
Number of observations {space 8}{result:197}
{hline 22}{c -}{hline 11}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LP.txt":Fig2_coefplot_data_LP.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 11}
{space 22} m_FT_OCC_HC
{hline 22}{c -}{hline 11}
Grand mean centered{space 3} {space 5}{result:-0.171}
{space 22} {space 5}{result:-0.302}
{space 22} {space 5}{result:-0.040}
Number of observations {space 8}{result:197}
{hline 22}{c -}{hline 11}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_HC.txt":Fig2_coefplot_data_HC.txt})
{p_end}
{res}
{smcl}
{reset}{...}
{hline 22}{c -}{hline 11}
{space 22} m_FT_OCC_LC
{hline 22}{c -}{hline 11}
Grand mean centered{space 3} {space 5}{result:-0.161}
{space 22} {space 5}{result:-0.277}
{space 22} {space 5}{result:-0.045}
Number of observations {space 8}{result:197}
{hline 22}{c -}{hline 11}
{res}{txt}{p 0 1 2}
(collection {res:ETable} exported to file {browse "C:/Users/hook/Desktop/Projects/WagePaper/1_Current_Draft/Socius_R&R/Replication/tables/Fig2_coefplot_data_LC.txt":Fig2_coefplot_data_LC.txt})
{p_end}

{com}.    
. /*
> *From .txt files:
> coefplot_data_HP.txt
> coefplot_data_LP.txt
> coefplot_data_HC.txt
> coefplot_data_LC.txt 
> 
> create 4 excel files of estimate (est), lower (ll95) and upper (ul95) ci for each model in graph:
> $MyProject\excel_data\dydx_sex_HP_for_coeffplot.xlsx
> $MyProject\excel_data\dydx_sex_LP_for_coeffplot.xlsx
> $MyProject\excel_data\dydx_sex_HC_for_coeffplot.xlsx
> $MyProject\excel_data\dydx_sex_LC_for_coeffplot.xlsx
> 
> File should look like (4 colums, 12 rows + labels)
> First row of data "Full-Time" is from HECK.reg labeled "m_Sample_FT", second row "Full-Time+" is from "m_FT_.."
> model           est             ll95    ul95
> Full-Time       
> Full-Time+      
> Hours   
> Hours+  
> Occ     
> Occ+    
> Public  
> Public+ 
> Exper   
> Exper+  
> FT-Occ  
> FT-Occ+ 
> 
> code below imports these excel files into Stata & makes plot
> */
. 
. 
. *********
. *Appendix Tables OS3-6: Re-run models for Figure 2 to create table for appendix: 12 models x 4 groups: 48 models*
. *********
. 
. *base models 4 groups*
. cd "$MyProject\tables"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\tables
{txt}
{com}. estimates clear
{res}{txt}
{com}. use "$MyProject\data\HECK.dta", clear
{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_HP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}. 
. esttab m* using Table_OS3_baseHP.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain replace
{res}{txt}{p 0 4 2}
(file {bf}
Table_OS3_baseHP.csv{rm}
not found)
{p_end}
(output written to {browse  `"Table_OS3_baseHP.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_LP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}. 
. esttab m* using Table_OS4_baseLP.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain replace 
{res}{txt}{p 0 4 2}
(file {bf}
Table_OS4_baseLP.csv{rm}
not found)
{p_end}
(output written to {browse  `"Table_OS4_baseLP.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_HC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}. 
. esttab m* using Table_OS5_baseHC.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain replace
{res}{txt}{p 0 4 2}
(file {bf}
Table_OS5_baseHC.csv{rm}
not found)
{p_end}
(output written to {browse  `"Table_OS5_baseHC.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_LC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}. 
. esttab m* using Table_OS6_baseLC.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain replace
{res}{txt}{p 0 4 2}
(file {bf}
Table_OS6_baseLC.csv{rm}
not found)
{p_end}
(output written to {browse  `"Table_OS6_baseLC.csv"'})

{com}. 
. *append from models using additional controls*
. estimates clear
{res}{txt}
{com}. local varlist FT WH OCC PUB EXP FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.         use "$MyProject\data/`var'.dta", clear
{txt}  3{com}. estimates clear
{txt}  4{com}. qui reg dydx_sex_HP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}  5{com}.         eststo m_`var'_HP
{txt}  6{com}.         esttab m* using Table_OS3_baseHP.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt}  7{com}. {c )-}
{res}{txt}(output written to {browse  `"Table_OS3_baseHP.csv"'})
{res}{txt}(output written to {browse  `"Table_OS3_baseHP.csv"'})
{res}{txt}(output written to {browse  `"Table_OS3_baseHP.csv"'})
{res}{txt}(output written to {browse  `"Table_OS3_baseHP.csv"'})
{res}{txt}(output written to {browse  `"Table_OS3_baseHP.csv"'})
{res}{txt}(output written to {browse  `"Table_OS3_baseHP.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist FT WH OCC PUB EXP FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.         use "$MyProject\data/`var'.dta", clear
{txt}  3{com}. estimates clear
{txt}  4{com}. qui reg dydx_sex_LP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}  5{com}.         eststo m_`var'_LP
{txt}  6{com}.         esttab m* using Table_OS4_baseLP.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt}  7{com}. {c )-}
{res}{txt}(output written to {browse  `"Table_OS4_baseLP.csv"'})
{res}{txt}(output written to {browse  `"Table_OS4_baseLP.csv"'})
{res}{txt}(output written to {browse  `"Table_OS4_baseLP.csv"'})
{res}{txt}(output written to {browse  `"Table_OS4_baseLP.csv"'})
{res}{txt}(output written to {browse  `"Table_OS4_baseLP.csv"'})
{res}{txt}(output written to {browse  `"Table_OS4_baseLP.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist FT WH OCC PUB EXP FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.         use "$MyProject\data/`var'.dta", clear
{txt}  3{com}. estimates clear
{txt}  4{com}. qui reg dydx_sex_HC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}  5{com}.         eststo m_`var'_HC
{txt}  6{com}.         esttab m* using Table_OS5_baseHC.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt}  7{com}. {c )-}
{res}{txt}(output written to {browse  `"Table_OS5_baseHC.csv"'})
{res}{txt}(output written to {browse  `"Table_OS5_baseHC.csv"'})
{res}{txt}(output written to {browse  `"Table_OS5_baseHC.csv"'})
{res}{txt}(output written to {browse  `"Table_OS5_baseHC.csv"'})
{res}{txt}(output written to {browse  `"Table_OS5_baseHC.csv"'})
{res}{txt}(output written to {browse  `"Table_OS5_baseHC.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist FT WH OCC PUB EXP FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.         use "$MyProject\data/`var'.dta", clear
{txt}  3{com}. estimates clear
{txt}  4{com}. qui reg dydx_sex_LC c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}  5{com}.         eststo m_`var'_LC
{txt}  6{com}.         esttab m* using Table_OS6_baseLC.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{txt}  7{com}. {c )-}
{res}{txt}(output written to {browse  `"Table_OS6_baseLC.csv"'})
{res}{txt}(output written to {browse  `"Table_OS6_baseLC.csv"'})
{res}{txt}(output written to {browse  `"Table_OS6_baseLC.csv"'})
{res}{txt}(output written to {browse  `"Table_OS6_baseLC.csv"'})
{res}{txt}(output written to {browse  `"Table_OS6_baseLC.csv"'})
{res}{txt}(output written to {browse  `"Table_OS6_baseLC.csv"'})

{com}. 
. ************
. * Appendix Table 2: Mean Gender Earnings Gap, add var models       
. ************
. 
. *Base models*
. estimates clear
{res}{txt}
{com}. use "$MyProject\data\HECK.dta", clear
{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.     sum dydx_sex if `var'==1
{txt}  3{com}.    {c )-}

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        280   -17.27964    4.165154   -27.6814    -6.9754

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        236   -17.34667    4.055337   -27.6814    -6.9754

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        217   -17.47336    4.059248   -27.6814    -6.9754

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        220   -17.07348    4.322282   -27.6814    -6.9754

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        159   -16.90685    3.890867   -26.7823    -6.9754

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        113   -17.97311    4.041293   -26.3924    -6.9754

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        197   -17.40804    4.260157   -27.6814    -6.9754
{txt}
{com}. 
. estimates clear
{txt}
{com}. local varlist FT WH OCC PUB EXP FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.         use "$MyProject\data/`var'.dta", clear
{txt}  3{com}. estimates clear
{txt}  4{com}. sum dydx_sex
{txt}  5{com}.    {c )-}   

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        236   -11.18791    3.714298   -24.0183      .5843

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        217   -10.47724    3.746278   -24.6336    -1.6412

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        220   -16.33595    3.885734   -26.8655     -6.907

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        159   -16.75959    3.515678    -25.893    -8.1604

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        113   -17.00748    4.009896   -24.8641    -5.5878

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        197   -11.30125    3.694082   -23.6554    -2.6205
{txt}
{com}.    
. *********************
. * SENSITIVITY ANALYSIS
. **********************
. 
. ******************
. *Spline Length (OS Table A-1 Testing Leave Length)*
. ******************
. 
. use "$MyProject\data\FT.dta", clear
{txt}
{com}. 
. cd "$MyProject\tables"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\tables
{txt}
{com}. 
. mkspline mospaid_L3 3  mospaid_H3 =  mospaid_lag1
{txt}
{com}. mkspline mospaid_L12 12  mospaid_H12 =  mospaid_lag1
{txt}
{com}. 
. local varlist mospaid_L3 mospaid_H3 mospaid_L12 mospaid_H12 
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    egen m_`var' = mean(`var')
{txt}  3{com}.    gen  c_`var' = `var'-m_`var'
{txt}  4{com}.    drop m_`var'
{txt}  5{com}.    label variable c_`var' "Grand mean centered" 
{txt}  6{com}.    {c )-}
{txt}
{com}. 
. estimates clear
{txt}
{com}. qui reg dydx_sex c_ecec1000 c_mospaid_lag1 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_lin
{txt}
{com}. qui reg dydx_sex c_ecec1000 c.c_mospaid_lag1##c.c_mospaid_lag1 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_sq
{txt}
{com}. qui reg dydx_sex c_ecec1000 c.c_mospaid_lag1##c.c_mospaid_lag1##c.c_mospaid_lag1 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_cub
{txt}
{com}. qui reg dydx_sex c_ecec1000 c.c_mospaid_lag1##c.c_mospaid_lag1##c.c_mospaid_lag1##c.c_mospaid_lag1 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_4poly
{txt}
{com}. mkspline2 ts= mospaid_lag1 , cubic nknots(4) displayknots

{txt}{space 0}{space 0}{ralign 12:}{space 1}{c |}{space 1}{ralign 9:knot1}{space 1}{space 1}{ralign 9:knot2}{space 1}{space 1}{ralign 9:knot3}{space 1}{space 1}{ralign 9:knot4}{space 1}
{space 0}{hline 13}{c   +}{hline 11}{hline 11}{hline 11}{hline 11}
{space 0}{space 0}{ralign 12:mospaid_lag1}{space 1}{c |}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf: 6.000046}}}{space 1}{space 1}{ralign 9:{res:{sf: 12.85724}}}{space 1}{space 1}{ralign 9:{res:{sf: 38.30799}}}{space 1}

{com}. qui reg dydx_sex c_ecec1000 ts* c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_CS4
{txt}
{com}. drop ts*
{txt}
{com}. qui reg dydx_sex c_ecec1000 c_mospaid_L3 c_mospaid_H3 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_H3
{txt}
{com}. qui reg dydx_sex c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_H6
{txt}
{com}. qui reg dydx_sex c_ecec1000 c_mospaid_L9 c_mospaid_H9 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_H9
{txt}
{com}. qui reg dydx_sex c_ecec1000 c_mospaid_L12 c_mospaid_H12 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_H12
{txt}
{com}. mkspline mospaid1 8.99  mospaid2 21.99 mospaid3 =  mospaid_lag1
{txt}
{com}. qui reg dydx_sex c_ecec1000 mospaid1 mospaid2 mospaid3 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_S3_9
{txt}
{com}. drop mospaid1 mospaid2 mospaid3
{txt}
{com}. mkspline mospaid1 6  mospaid2 21 mospaid3 =  mospaid_lag1
{txt}
{com}. qui reg dydx_sex c_ecec1000 mospaid1 mospaid2 mospaid3 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_S3_6 
{txt}
{com}. 
. esttab m* using Table_OS1.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain replace
{res}{txt}{p 0 4 2}
(file {bf}
Table_OS1.csv{rm}
not found)
{p_end}
(output written to {browse  `"Table_OS1.csv"'})

{com}. 
. *************************
. * RESTRICT ANALYSIS TO LAST OBSERVATION IN EACH COUNTRY, N =26: Tables OS-7 and OS-8*
. *************************
. 
. use "$MyProject\data\HECK.dta", clear
{txt}
{com}. 
. cd "$MyProject\tables"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\tables
{txt}
{com}. 
. sort cname year
{txt}
{com}. by cname : generate n1 = _n
{txt}
{com}. by cname : generate n2 = _N
{txt}
{com}. gen last=.
{txt}(280 missing values generated)

{com}. replace last=1 if n1==n2
{txt}(26 real changes made)

{com}. tab year

       {txt}year {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
       1999 {c |}{res}          7        2.50        2.50
{txt}       2000 {c |}{res}         15        5.36        7.86
{txt}       2001 {c |}{res}          4        1.43        9.29
{txt}       2002 {c |}{res}          7        2.50       11.79
{txt}       2003 {c |}{res}          8        2.86       14.64
{txt}       2004 {c |}{res}         23        8.21       22.86
{txt}       2005 {c |}{res}         10        3.57       26.43
{txt}       2006 {c |}{res}         10        3.57       30.00
{txt}       2007 {c |}{res}         23        8.21       38.21
{txt}       2008 {c |}{res}         12        4.29       42.50
{txt}       2009 {c |}{res}         12        4.29       46.79
{txt}       2010 {c |}{res}         25        8.93       55.71
{txt}       2011 {c |}{res}         11        3.93       59.64
{txt}       2012 {c |}{res}         12        4.29       63.93
{txt}       2013 {c |}{res}         21        7.50       71.43
{txt}       2014 {c |}{res}         14        5.00       76.43
{txt}       2015 {c |}{res}         14        5.00       81.43
{txt}       2016 {c |}{res}         22        7.86       89.29
{txt}       2017 {c |}{res}         13        4.64       93.93
{txt}       2018 {c |}{res}         13        4.64       98.57
{txt}       2019 {c |}{res}          4        1.43      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        280      100.00
{txt}
{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1 & last==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_OS7.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain replace
{res}{txt}{p 0 4 2}
(file {bf}
Table_OS7.csv{rm}
not found)
{p_end}
(output written to {browse  `"Table_OS7.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_HP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1 & last==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_OS7.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_OS7.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_sex_LP c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1 & last==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_OS7.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_OS7.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_mother c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1 & last==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_OS8.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain replace
{res}{txt}{p 0 4 2}
(file {bf}
Table_OS8.csv{rm}
not found)
{p_end}
(output written to {browse  `"Table_OS8.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_par_WH c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1 & last==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_OS8.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_OS8.csv"'})

{com}. 
. estimates clear
{res}{txt}
{com}. local varlist Sample_all Sample_FT Sample_WH Sample_OCC Sample_Public Sample_EXP Sample_FT_OCC
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.    qui reg dydx_par_WL c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  if `var'==1 & last==1, vce(hc2 cname, dfadjust)
{txt}  3{com}.         eststo m_`var'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab m* using Table_OS8.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}(output written to {browse  `"Table_OS8.csv"'})

{com}. 
. ********************Sensitivity Analyses Not Shown****************************
. *************
. * Fathers' leave
. *************
. use "$MyProject\data\HECK.dta", clear
{txt}
{com}. 
. cd "$MyProject\tables"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\tables
{txt}
{com}. 
. estimates clear
{res}{txt}
{com}. qui reg dydx_sex c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2  c_mospaid_father_lag1, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_sex
{txt}
{com}. 
. qui reg dydx_mother c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2 c_mospaid_father_lag1, vce(hc2 cname, dfadjust)
{txt}
{com}. eststo m_mom
{txt}
{com}. 
. esttab m*, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}
{txt}                    m_sex            m_mom    
{txt}                     b/se             b/se    
{txt}c_ecec1000  {res}        0.378            0.271    {txt}
            {res}        0.250            0.692    {txt}
{txt}c_mospaid_L6{res}       -0.165           -0.650    {txt}
            {res}        0.344            0.448    {txt}
{txt}c_mospaid_H6{res}       -0.161 *         -0.074    {txt}
            {res}        0.064            0.086    {txt}
{txt}c_gnorm_lag1{res}        0.367            1.875    {txt}
            {res}        2.242            3.655    {txt}
{txt}c_wpt_lag1  {res}       -0.216 ***       -0.260 ***{txt}
            {res}        0.036            0.068    {txt}
{txt}c_PubSec_l~1{res}       -0.168            0.029    {txt}
            {res}        0.091            0.200    {txt}
{txt}year2       {res}        0.203 *          0.035    {txt}
            {res}        0.076            0.092    {txt}
{txt}c_mos~r_lag1{res}       -0.071            0.330    {txt}
            {res}        0.199            0.485    {txt}
{txt}_cons       {res}      -19.422 ***       -7.718 ***{txt}
            {res}        0.703            1.619    {txt}
{txt}N           {res}          280              280    {txt}
{txt}R-sq        {res}        0.549            0.475    {txt}
{txt}AIC         {res}     1387.748         1573.048    {txt}
{txt}BIC         {res}     1420.461         1605.761    {txt}

{com}. esttab m* using STable_fathersleave.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}{p 0 4 2}
(file {bf}
STable_fathersleave.csv{rm}
not found)
{p_end}
(output written to {browse  `"STable_fathersleave.csv"'})

{com}. 
. 
. ************
. * One country omitted
. ************
. use "$MyProject\data\HECK.dta", clear
{txt}
{com}. 
. cd "$MyProject\tables"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\tables
{txt}
{com}. 
. estimates clear
{res}{txt}
{com}. global cos "at  au      be      ch      cz      de      dk      ee      es      fi      fr      gr      hu      ie      is      it      lt      lu      nl      no      pl      se      si      sk      uk      us" 
{txt}
{com}.        
. foreach cc in $cos {c -(}             
{txt}  2{com}. qui reg dydx_sex c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2 if cname!="`cc'", vce(hc2 cname, dfadjust) 
{txt}  3{com}. estimates store no_`cc'
{txt}  4{com}.    {c )-}
{txt}
{com}.    
. esttab n* using STable_omit_one.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}{p 0 4 2}
(file {bf}
STable_omit_one.csv{rm}
not found)
{p_end}
(output written to {browse  `"STable_omit_one.csv"'})

{com}. 
. ***********************
. *Run NKIDS syntax in LIS, put resutls in Excel File named NKIDS_results.xlxs*
. ***********************
. 
. *Women only; nchildren*
. local varlist NKIDS
{txt}
{com}. foreach var of local varlist  {c -(}
{txt}  2{com}.         import excel "$MyProject\excel_data/`var'_results.xlsx", sheet("Sheet1") firstrow clear
{txt}  3{com}.         save "$MyProject\data/`var'.dta", replace
{txt}  4{com}.         merge 1:1 dname using "$MyProject\data\Macro_and_Sample_Vars.dta" 
{txt}  5{com}.         drop if _merge==2
{txt}  6{com}.         drop _merge
{txt}  7{com}.         order cname Country
{txt}  8{com}.         save "$MyProject\data/`var'.dta", replace
{txt}  9{com}.    {c )-}
{res}{text}(8 vars, 280 obs)
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/NKIDS.dta{rm}
saved
{p_end}
{res}{txt}{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}             280{txt}  (_merge==3)
{col 5}{hline 41}
(0 observations deleted)
{p 0 4 2}
file {bf}
C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\data/NKIDS.dta{rm}
saved
{p_end}

{com}. 
. cd "$MyProject\tables"   
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\tables
{txt}
{com}. estimates clear
{res}{txt}
{com}. reg dydx_mother c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)

{txt}Computing degrees of freedom ...
{res}
{txt}{col 1}Linear regression{col 57}{lalign 13:Number of obs}{col 70} = {res}{ralign 6:280}
{txt}{col 57}{lalign 13:F({res:7}, {res:25})}{col 70} = {res}{ralign 6:6.02}
{txt}{col 57}{lalign 13:Prob > F}{col 70} = {res}{ralign 6:0.0003}
{txt}{col 57}{lalign 13:R-squared}{col 70} = {res}{ralign 6:0.4376}
{txt}{col 57}{lalign 13:Adj R-squared}{col 70} = {res}{ralign 6:0.4232}
{txt}{col 57}{lalign 13:Root MSE}{col 70} = {res}{ralign 6:1.6444}

{txt}{ralign 79:(Std. err. adjusted for {res:26} clusters in {res:cname})}
{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27}  Robust HC2
{col 1}  dydx_mother{col 15}{c |} Coefficient{col 27}  std. err.{col 39}      t{col 47}   P>|t|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2} .0561857{col 27}{space 2} .2595277{col 38}{space 1}    0.22{col 47}{space 3}0.833{col 55}{space 4}-.5232441{col 68}{space 3} .6356156
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2}-.1672915{col 27}{space 2}  .164991{col 38}{space 1}   -1.01{col 47}{space 3}0.370{col 55}{space 4}-.6323306{col 68}{space 3} .2977476
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2}-.0342485{col 27}{space 2} .0286351{col 38}{space 1}   -1.20{col 47}{space 3}0.255{col 55}{space 4}-.0965865{col 68}{space 3} .0280895
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2}  1.85072{col 27}{space 2} 1.297545{col 38}{space 1}    1.43{col 47}{space 3}0.180{col 55}{space 4}-.9892745{col 68}{space 3} 4.690715
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}-.0954663{col 27}{space 2} .0286262{col 38}{space 1}   -3.33{col 47}{space 3}0.008{col 55}{space 4}-.1595339{col 68}{space 3}-.0313988
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2} .0177129{col 27}{space 2} .0741927{col 38}{space 1}    0.24{col 47}{space 3}0.815{col 55}{space 4} -.143829{col 68}{space 3} .1792547
{txt}{space 8}year2 {c |}{col 15}{res}{space 2} .0024739{col 27}{space 2} .0358191{col 38}{space 1}    0.07{col 47}{space 3}0.946{col 55}{space 4}-.0730541{col 68}{space 3} .0780019
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-3.764543{col 27}{space 2} .5868458{col 38}{space 1}   -6.41{col 47}{space 3}0.000{col 55}{space 4}-4.999835{col 68}{space 3}-2.529252
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 2}Note: p-values computed using adjusted degrees of freedom.{p_end}

{com}.         eststo m_par
{txt}
{com}. reg dydx_par_WH c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)

{txt}Computing degrees of freedom ...
{res}
{txt}{col 1}Linear regression{col 57}{lalign 13:Number of obs}{col 70} = {res}{ralign 6:280}
{txt}{col 57}{lalign 13:F({res:7}, {res:25})}{col 70} = {res}{ralign 6:2.83}
{txt}{col 57}{lalign 13:Prob > F}{col 70} = {res}{ralign 6:0.0255}
{txt}{col 57}{lalign 13:R-squared}{col 70} = {res}{ralign 6:0.3800}
{txt}{col 57}{lalign 13:Adj R-squared}{col 70} = {res}{ralign 6:0.3641}
{txt}{col 57}{lalign 13:Root MSE}{col 70} = {res}{ralign 6:2.6221}

{txt}{ralign 79:(Std. err. adjusted for {res:26} clusters in {res:cname})}
{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27}  Robust HC2
{col 1}  dydx_par_WH{col 15}{c |} Coefficient{col 27}  std. err.{col 39}      t{col 47}   P>|t|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2} .2968094{col 27}{space 2} .4002098{col 38}{space 1}    0.74{col 47}{space 3}0.476{col 55}{space 4}-.5967116{col 68}{space 3}  1.19033
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2} .0941653{col 27}{space 2} .3333868{col 38}{space 1}    0.28{col 47}{space 3}0.792{col 55}{space 4}-.8455096{col 68}{space 3}  1.03384
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2}-.0241709{col 27}{space 2} .0450578{col 38}{space 1}   -0.54{col 47}{space 3}0.601{col 55}{space 4} -.122261{col 68}{space 3} .0739191
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2} .5238344{col 27}{space 2} 2.240674{col 38}{space 1}    0.23{col 47}{space 3}0.819{col 55}{space 4}-4.380432{col 68}{space 3}   5.4281
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}-.1500425{col 27}{space 2} .0502543{col 38}{space 1}   -2.99{col 47}{space 3}0.014{col 55}{space 4}-.2625153{col 68}{space 3}-.0375696
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2}-.1814598{col 27}{space 2} .1214185{col 38}{space 1}   -1.49{col 47}{space 3}0.161{col 55}{space 4}-.4458279{col 68}{space 3} .0829083
{txt}{space 8}year2 {c |}{col 15}{res}{space 2}-.1313135{col 27}{space 2} .0627417{col 38}{space 1}   -2.09{col 47}{space 3}0.052{col 55}{space 4}-.2636103{col 68}{space 3} .0009834
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}  2.75762{col 27}{space 2} .9154702{col 38}{space 1}    3.01{col 47}{space 3}0.008{col 55}{space 4} .8305852{col 68}{space 3} 4.684655
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 2}Note: p-values computed using adjusted degrees of freedom.{p_end}

{com}.         eststo m_par_WH
{txt}
{com}. reg dydx_par_WL c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)

{txt}Computing degrees of freedom ...
{res}
{txt}{col 1}Linear regression{col 57}{lalign 13:Number of obs}{col 70} = {res}{ralign 6:280}
{txt}{col 57}{lalign 13:F({res:7}, {res:25})}{col 70} = {res}{ralign 6:8.82}
{txt}{col 57}{lalign 13:Prob > F}{col 70} = {res}{ralign 6:0.0000}
{txt}{col 57}{lalign 13:R-squared}{col 70} = {res}{ralign 6:0.4442}
{txt}{col 57}{lalign 13:Adj R-squared}{col 70} = {res}{ralign 6:0.4299}
{txt}{col 57}{lalign 13:Root MSE}{col 70} = {res}{ralign 6:1.4833}

{txt}{ralign 79:(Std. err. adjusted for {res:26} clusters in {res:cname})}
{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27}  Robust HC2
{col 1}  dydx_par_WL{col 15}{c |} Coefficient{col 27}  std. err.{col 39}      t{col 47}   P>|t|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2} .0594951{col 27}{space 2} .2328144{col 38}{space 1}    0.26{col 47}{space 3}0.804{col 55}{space 4}-.4602937{col 68}{space 3} .5792839
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2}-.2721288{col 27}{space 2} .1178571{col 38}{space 1}   -2.31{col 47}{space 3}0.085{col 55}{space 4}-.6043176{col 68}{space 3}   .06006
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2}  .005612{col 27}{space 2} .0220655{col 38}{space 1}    0.25{col 47}{space 3}0.804{col 55}{space 4}-.0424243{col 68}{space 3} .0536483
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2}  .418449{col 27}{space 2} 1.155315{col 38}{space 1}    0.36{col 47}{space 3}0.724{col 55}{space 4}-2.110242{col 68}{space 3}  2.94714
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}-.0697481{col 27}{space 2} .0202664{col 38}{space 1}   -3.44{col 47}{space 3}0.007{col 55}{space 4} -.115106{col 68}{space 3}-.0243903
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2}  .081051{col 27}{space 2} .0794257{col 38}{space 1}    1.02{col 47}{space 3}0.328{col 55}{space 4}-.0918849{col 68}{space 3} .2539868
{txt}{space 8}year2 {c |}{col 15}{res}{space 2}-.0467911{col 27}{space 2} .0333101{col 38}{space 1}   -1.40{col 47}{space 3}0.178{col 55}{space 4}-.1170286{col 68}{space 3} .0234463
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-6.254675{col 27}{space 2} .4335415{col 38}{space 1}  -14.43{col 47}{space 3}0.000{col 55}{space 4}-7.167265{col 68}{space 3}-5.342084
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 2}Note: p-values computed using adjusted degrees of freedom.{p_end}

{com}.         eststo m_par_WL
{txt}
{com}. esttab m* using STable_Women_Nkids.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}{p 0 4 2}
(file {bf}
STable_Women_Nkids.csv{rm}
not found)
{p_end}
(output written to {browse  `"STable_Women_Nkids.csv"'})

{com}. 
. *********************   
. *logged income as DV Run logged income syntax in LIS, resutls in Excel File*
. *********************
. /*Import LIS results from Excel
> local varlist LOGGED_INC
> foreach var of local varlist  {c -(}
>         import excel "$MyProject\excel_data/`var'_results.xlsx", sheet("Sheet1") firstrow clear
>         save "$MyProject\data/`var'.dta", replace
>         merge 1:1 dname using "$MyProject\data\Macro_and_Sample_Vars.dta" 
>         drop if _merge==2
>         drop _merge
>         order cname Country
>         save "$MyProject\data/`var'.dta", replace
>    {c )-}
> */
.   
. use "$MyProject\data\LOGGED_INC.dta", clear
{txt}
{com}. 
. cd "$MyProject\tables"
{res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\tables
{txt}
{com}. 
. sum dydx_sex dydx_mother

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}dydx_sex {c |}{res}        280   -.3890782    .1620806      -.954      .1477
{txt}{space 1}dydx_mother {c |}{res}        280   -.1684854    .1618916    -1.2599       .176
{txt}
{com}. 
. estimates clear
{res}{txt}
{com}. 
. reg dydx_sex c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)

{txt}Computing degrees of freedom ...
{res}
{txt}{col 1}Linear regression{col 57}{lalign 13:Number of obs}{col 70} = {res}{ralign 6:280}
{txt}{col 57}{lalign 13:F({res:7}, {res:25})}{col 70} = {res}{ralign 6:3.12}
{txt}{col 57}{lalign 13:Prob > F}{col 70} = {res}{ralign 6:0.0166}
{txt}{col 57}{lalign 13:R-squared}{col 70} = {res}{ralign 6:0.2122}
{txt}{col 57}{lalign 13:Adj R-squared}{col 70} = {res}{ralign 6:0.1920}
{txt}{col 57}{lalign 13:Root MSE}{col 70} = {res}{ralign 6:0.1457}

{txt}{ralign 79:(Std. err. adjusted for {res:26} clusters in {res:cname})}
{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27}  Robust HC2
{col 1}     dydx_sex{col 15}{c |} Coefficient{col 27}  std. err.{col 39}      t{col 47}   P>|t|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2}  .009172{col 27}{space 2} .0105596{col 38}{space 1}    0.87{col 47}{space 3}0.406{col 55}{space 4}-.0144038{col 68}{space 3} .0327478
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2}-.0004184{col 27}{space 2} .0094441{col 38}{space 1}   -0.04{col 47}{space 3}0.967{col 55}{space 4}-.0270372{col 68}{space 3} .0262004
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2}-.0041583{col 27}{space 2} .0018417{col 38}{space 1}   -2.26{col 47}{space 3}0.043{col 55}{space 4}-.0081675{col 68}{space 3} -.000149
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2} .1813345{col 27}{space 2} .0824666{col 38}{space 1}    2.20{col 47}{space 3}0.049{col 55}{space 4} .0008362{col 68}{space 3} .3618328
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}-.0046771{col 27}{space 2} .0017061{col 38}{space 1}   -2.74{col 47}{space 3}0.021{col 55}{space 4}-.0084954{col 68}{space 3}-.0008587
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2}-.0079965{col 27}{space 2} .0047003{col 38}{space 1}   -1.70{col 47}{space 3}0.114{col 55}{space 4}-.0182306{col 68}{space 3} .0022377
{txt}{space 8}year2 {c |}{col 15}{res}{space 2} .0031007{col 27}{space 2} .0035065{col 38}{space 1}    0.88{col 47}{space 3}0.389{col 55}{space 4}-.0042931{col 68}{space 3} .0104945
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-.4218461{col 27}{space 2} .0425523{col 38}{space 1}   -9.91{col 47}{space 3}0.000{col 55}{space 4}-.5114174{col 68}{space 3}-.3322749
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 2}Note: p-values computed using adjusted degrees of freedom.{p_end}

{com}. eststo m_logsex
{txt}
{com}. reg dydx_mother c_ecec1000 c_mospaid_L6 c_mospaid_H6 c_gnorm_lag1 c_wpt_lag1 c_PubSec_lag1 year2, vce(hc2 cname, dfadjust)

{txt}Computing degrees of freedom ...
{res}
{txt}{col 1}Linear regression{col 57}{lalign 13:Number of obs}{col 70} = {res}{ralign 6:280}
{txt}{col 57}{lalign 13:F({res:7}, {res:25})}{col 70} = {res}{ralign 6:2.03}
{txt}{col 57}{lalign 13:Prob > F}{col 70} = {res}{ralign 6:0.0906}
{txt}{col 57}{lalign 13:R-squared}{col 70} = {res}{ralign 6:0.1408}
{txt}{col 57}{lalign 13:Adj R-squared}{col 70} = {res}{ralign 6:0.1186}
{txt}{col 57}{lalign 13:Root MSE}{col 70} = {res}{ralign 6:0.1520}

{txt}{ralign 79:(Std. err. adjusted for {res:26} clusters in {res:cname})}
{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27}  Robust HC2
{col 1}  dydx_mother{col 15}{c |} Coefficient{col 27}  std. err.{col 39}      t{col 47}   P>|t|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 3}c_ecec1000 {c |}{col 15}{res}{space 2} .0161732{col 27}{space 2} .0176845{col 38}{space 1}    0.91{col 47}{space 3}0.382{col 55}{space 4}-.0233098{col 68}{space 3} .0556561
{txt}{space 1}c_mospaid_L6 {c |}{col 15}{res}{space 2}-.0176521{col 27}{space 2} .0144371{col 38}{space 1}   -1.22{col 47}{space 3}0.291{col 55}{space 4}-.0583441{col 68}{space 3}   .02304
{txt}{space 1}c_mospaid_H6 {c |}{col 15}{res}{space 2}-.0009833{col 27}{space 2} .0024522{col 38}{space 1}   -0.40{col 47}{space 3}0.695{col 55}{space 4}-.0063217{col 68}{space 3} .0043551
{txt}{space 1}c_gnorm_lag1 {c |}{col 15}{res}{space 2} .1136647{col 27}{space 2} .1071172{col 38}{space 1}    1.06{col 47}{space 3}0.310{col 55}{space 4}-.1207875{col 68}{space 3}  .348117
{txt}{space 3}c_wpt_lag1 {c |}{col 15}{res}{space 2}-.0028986{col 27}{space 2} .0017929{col 38}{space 1}   -1.62{col 47}{space 3}0.138{col 55}{space 4}-.0069112{col 68}{space 3} .0011141
{txt}c_PubSec_lag1 {c |}{col 15}{res}{space 2}-.0027791{col 27}{space 2} .0051771{col 38}{space 1}   -0.54{col 47}{space 3}0.601{col 55}{space 4}-.0140513{col 68}{space 3}  .008493
{txt}{space 8}year2 {c |}{col 15}{res}{space 2} .0002367{col 27}{space 2} .0027993{col 38}{space 1}    0.08{col 47}{space 3}0.934{col 55}{space 4}-.0056658{col 68}{space 3} .0061392
{txt}{space 8}_cons {c |}{col 15}{res}{space 2}-.1709869{col 27}{space 2} .0481117{col 38}{space 1}   -3.55{col 47}{space 3}0.002{col 55}{space 4}-.2722605{col 68}{space 3}-.0697134
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 2}Note: p-values computed using adjusted degrees of freedom.{p_end}

{com}. eststo m_logmom
{txt}
{com}. 
. esttab m* using STable_loginc.csv, se b(3) star bic aic r2 mtitles stardetach noparentheses nolines plain append
{res}{txt}{p 0 4 2}
(file {bf}
STable_loginc.csv{rm}
not found)
{p_end}
(output written to {browse  `"STable_loginc.csv"'})

{com}. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\hook\Desktop\Projects\WagePaper\1_Current_Draft\Socius_R&R\Replication\log.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res} 2 Jul 2025, 14:20:21
{txt}{.-}
{smcl}
{txt}{sf}{ul off}